SDL: new option HideSystemMousePointer for hiding Android system mouse pointer when USB mouse is used, tested only on emulator so might not work at all
This commit is contained in:
@@ -319,6 +319,9 @@ echo >> AndroidAppSettings.cfg
|
||||
echo "# Immersive mode - Android will hide on-screen Home/Back keys. Looks bad if you invoke Android keyboard. (y) / (n)" >> AndroidAppSettings.cfg
|
||||
echo ImmersiveMode=$ImmersiveMode >> AndroidAppSettings.cfg
|
||||
echo >> AndroidAppSettings.cfg
|
||||
echo "# Hide Android system mouse cursor image when USB mouse is attached (y) or (n) - the app must draw it's own mouse cursor" >> AndroidAppSettings.cfg
|
||||
echo HideSystemMousePointer=$HideSystemMousePointer >> AndroidAppSettings.cfg
|
||||
echo >> AndroidAppSettings.cfg
|
||||
echo "# Application implements Android-specific routines to put to background, and will not draw anything to screen" >> AndroidAppSettings.cfg
|
||||
echo "# between SDL_ACTIVEEVENT lost / gained notifications - you should check for them" >> AndroidAppSettings.cfg
|
||||
echo "# rigth after SDL_Flip(), if (n) then SDL_Flip() will block till app in background (y) or (n)" >> AndroidAppSettings.cfg
|
||||
@@ -840,6 +843,12 @@ else
|
||||
ImmersiveMode=true
|
||||
fi
|
||||
|
||||
if [ "$HideSystemMousePointer" = "y" ]; then
|
||||
HideSystemMousePointer=true
|
||||
else
|
||||
HideSystemMousePointer=false
|
||||
fi
|
||||
|
||||
GLESLib=-lGLESv1_CM
|
||||
GLESVersion=-DSDL_VIDEO_OPENGL_ES_VERSION=1
|
||||
|
||||
@@ -909,6 +918,7 @@ $SEDI "s/public static boolean AppUsesMultitouch = .*;/public static boolean App
|
||||
$SEDI "s/public static boolean NonBlockingSwapBuffers = .*;/public static boolean NonBlockingSwapBuffers = $NonBlockingSwapBuffers;/" project/src/Globals.java
|
||||
$SEDI "s/public static boolean ResetSdlConfigForThisVersion = .*;/public static boolean ResetSdlConfigForThisVersion = $ResetSdlConfigForThisVersion;/" project/src/Globals.java
|
||||
$SEDI "s/public static boolean ImmersiveMode = .*;/public static boolean ImmersiveMode = $ImmersiveMode;/" project/src/Globals.java
|
||||
$SEDI "s/public static boolean HideSystemMousePointer = .*;/public static boolean HideSystemMousePointer = $HideSystemMousePointer;/" project/src/Globals.java
|
||||
$SEDI "s|public static String DeleteFilesOnUpgrade = .*;|public static String DeleteFilesOnUpgrade = \"$DeleteFilesOnUpgrade\";|" project/src/Globals.java
|
||||
$SEDI "s/public static int AppTouchscreenKeyboardKeysAmount = .*;/public static int AppTouchscreenKeyboardKeysAmount = $AppTouchscreenKeyboardKeysAmount;/" project/src/Globals.java
|
||||
$SEDI "s@public static String\\[\\] AppTouchscreenKeyboardKeysNames = .*;@public static String[] AppTouchscreenKeyboardKeysNames = \"$RedefinedKeysScreenKbNames\".split(\" \");@" project/src/Globals.java
|
||||
|
||||
@@ -85,6 +85,7 @@ class Globals
|
||||
public static boolean HorizontalOrientation = true;
|
||||
public static boolean AutoDetectOrientation = false;
|
||||
public static boolean ImmersiveMode = true;
|
||||
public static boolean HideSystemMousePointer = false;
|
||||
public static boolean DownloadToSdcard = true;
|
||||
public static boolean PhoneHasArrowKeys = false;
|
||||
public static boolean UseAccelerometerAsArrowKeys = false;
|
||||
|
||||
@@ -446,7 +446,10 @@ public class MainActivity extends Activity
|
||||
mGLView.setFocusableInTouchMode(true);
|
||||
mGLView.setFocusable(true);
|
||||
mGLView.requestFocus();
|
||||
|
||||
if (Globals.HideSystemMousePointer && android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N)
|
||||
{
|
||||
mGLView.setPointerIcon(android.view.PointerIcon.getSystemIcon(this, android.view.PointerIcon.TYPE_NULL));
|
||||
}
|
||||
|
||||
if( _ad.getView() != null )
|
||||
{
|
||||
|
||||
@@ -7,10 +7,10 @@ AppName="Ninslash"
|
||||
AppFullName=ninslash.com
|
||||
|
||||
# Application version code (integer)
|
||||
AppVersionCode=02523
|
||||
AppVersionCode=02625
|
||||
|
||||
# Application user-visible version name (string)
|
||||
AppVersionName="0.2.5.23"
|
||||
AppVersionName="0.2.6.25"
|
||||
|
||||
# Specify path to download application data in zip archive in the form 'Description|URL|MirrorURL^Description2|URL2|MirrorURL2^...'
|
||||
# If you'll start Description with '!' symbol it will be enabled by default, other downloads should be selected by user from startup config menu
|
||||
@@ -54,8 +54,8 @@ NeedGles2=y
|
||||
# you need this option only if you're developing 3-d app (y) or (n)
|
||||
NeedGles3=n
|
||||
|
||||
# Use glshim library for provide OpenGL 1.x functionality to OpenGL ES accelerated cards (y) or (n)
|
||||
UseGlshim=
|
||||
# Use gl4es library for provide OpenGL 1.x functionality to OpenGL ES accelerated cards (y) or (n)
|
||||
UseGl4es=
|
||||
|
||||
# Application uses software video buffer - you're calling SDL_SetVideoMode() without SDL_HWSURFACE and without SDL_OPENGL,
|
||||
# this will allow small speed optimization. Enable this even when you're using SDL_HWSURFACE. (y) or (n)
|
||||
@@ -186,6 +186,9 @@ AccessInternet=y
|
||||
# Immersive mode - Android will hide on-screen Home/Back keys. Looks bad if you invoke Android keyboard. (y) / (n)
|
||||
ImmersiveMode=y
|
||||
|
||||
# Hide Android system mouse cursor image when USB mouse is attached (y) or (n) - the app must draw it's own mouse cursor
|
||||
HideSystemMousePointer=y
|
||||
|
||||
# Application implements Android-specific routines to put to background, and will not draw anything to screen
|
||||
# between SDL_ACTIVEEVENT lost / gained notifications - you should check for them
|
||||
# rigth after SDL_Flip(), if (n) then SDL_Flip() will block till app in background (y) or (n)
|
||||
@@ -263,13 +266,13 @@ CompiledLibraries="sdl_image freetype glu"
|
||||
CustomBuildScript=n
|
||||
|
||||
# Aditional CFLAGS for application
|
||||
AppCflags='-O2 -Werror=format -isystem jni/application/src/src/src/base/android' # -flto
|
||||
AppCflags='-O2 -Werror=format -isystem jni/application/src/src/src/base/android'
|
||||
|
||||
# Aditional C++-specific compiler flags for application, added after AppCflags
|
||||
AppCppflags='-std=c++11'
|
||||
|
||||
# Additional LDFLAGS for application
|
||||
AppLdflags='-lEGL' # -flto
|
||||
AppLdflags='-lEGL'
|
||||
|
||||
# If application has headers with the same name as system headers, this option tries to fix compiler flags to make it compilable
|
||||
AppOverlapsSystemHeaders=n
|
||||
|
||||
Submodule project/jni/application/ninslash/src updated: 1236d82f78...aa9638f2d6
@@ -140,6 +140,8 @@ AppNeedsArrowKeys=n
|
||||
# Joystick always follows finger, so moving mouse requires touching the screen with other finger
|
||||
FloatingScreenJoystick=
|
||||
|
||||
HideSystemMousePointer=y
|
||||
|
||||
# Application needs text input (y) or (n), enables button for text input on screen
|
||||
AppNeedsTextInput=n
|
||||
|
||||
|
||||
Reference in New Issue
Block a user