Added hack to enforce relative mouse movement mode, for PUAE
This commit is contained in:
@@ -214,6 +214,16 @@ if [ -n "$var" ] ; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "$ForceRelativeMouseMode" -o -z "$AUTO" ]; then
|
||||||
|
echo
|
||||||
|
echo -n "Force relative (laptop) mouse movement mode, if both on-screen keyboard and mouse are needed (y) or (n) ($ForceRelativeMouseMode): "
|
||||||
|
read var
|
||||||
|
if [ -n "$var" ] ; then
|
||||||
|
ForceRelativeMouseMode="$var"
|
||||||
|
CHANGED=1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -z "$AppNeedsArrowKeys" -o -z "$AUTO" ]; then
|
if [ -z "$AppNeedsArrowKeys" -o -z "$AUTO" ]; then
|
||||||
echo
|
echo
|
||||||
echo "Application needs arrow keys (y) or (n), if (y) the accelerometer or touchscreen keyboard"
|
echo "Application needs arrow keys (y) or (n), if (y) the accelerometer or touchscreen keyboard"
|
||||||
@@ -367,7 +377,7 @@ if [ -n "$var" ] ; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
FirstStartMenuOptionsDefault='(AppUsesMouse ? new Settings.DisplaySizeConfig(true) : new Settings.DummyMenu()), new Settings.OptionalDownloadConfig(true)'
|
FirstStartMenuOptionsDefault='(AppUsesMouse \&\& \! ForceRelativeMouseMode ? new Settings.DisplaySizeConfig(true) : new Settings.DummyMenu()), new Settings.OptionalDownloadConfig(true)'
|
||||||
if [ -z "$AUTO" ]; then
|
if [ -z "$AUTO" ]; then
|
||||||
echo
|
echo
|
||||||
echo "Menu items to show at startup - this is Java code snippet, leave empty for default"
|
echo "Menu items to show at startup - this is Java code snippet, leave empty for default"
|
||||||
@@ -526,6 +536,7 @@ echo SdlVideoResizeKeepAspect=$SdlVideoResizeKeepAspect >> AndroidAppSettings.cf
|
|||||||
echo CompatibilityHacks=$CompatibilityHacks >> AndroidAppSettings.cfg
|
echo CompatibilityHacks=$CompatibilityHacks >> AndroidAppSettings.cfg
|
||||||
echo AppUsesMouse=$AppUsesMouse >> AndroidAppSettings.cfg
|
echo AppUsesMouse=$AppUsesMouse >> AndroidAppSettings.cfg
|
||||||
echo AppNeedsTwoButtonMouse=$AppNeedsTwoButtonMouse >> AndroidAppSettings.cfg
|
echo AppNeedsTwoButtonMouse=$AppNeedsTwoButtonMouse >> AndroidAppSettings.cfg
|
||||||
|
echo ForceRelativeMouseMode=$ForceRelativeMouseMode >> AndroidAppSettings.cfg
|
||||||
echo AppNeedsArrowKeys=$AppNeedsArrowKeys >> AndroidAppSettings.cfg
|
echo AppNeedsArrowKeys=$AppNeedsArrowKeys >> AndroidAppSettings.cfg
|
||||||
echo AppNeedsTextInput=$AppNeedsTextInput >> AndroidAppSettings.cfg
|
echo AppNeedsTextInput=$AppNeedsTextInput >> AndroidAppSettings.cfg
|
||||||
echo AppUsesJoystick=$AppUsesJoystick >> AndroidAppSettings.cfg
|
echo AppUsesJoystick=$AppUsesJoystick >> AndroidAppSettings.cfg
|
||||||
@@ -630,6 +641,12 @@ else
|
|||||||
AppNeedsTwoButtonMouse=false
|
AppNeedsTwoButtonMouse=false
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$ForceRelativeMouseMode" = "y" ] ; then
|
||||||
|
ForceRelativeMouseMode=true
|
||||||
|
else
|
||||||
|
ForceRelativeMouseMode=false
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$AppNeedsArrowKeys" = "y" ] ; then
|
if [ "$AppNeedsArrowKeys" = "y" ] ; then
|
||||||
AppNeedsArrowKeys=true
|
AppNeedsArrowKeys=true
|
||||||
else
|
else
|
||||||
@@ -707,6 +724,7 @@ done
|
|||||||
if [ -z "$FirstStartMenuOptions" ]; then
|
if [ -z "$FirstStartMenuOptions" ]; then
|
||||||
FirstStartMenuOptions="$FirstStartMenuOptionsDefault"
|
FirstStartMenuOptions="$FirstStartMenuOptionsDefault"
|
||||||
fi
|
fi
|
||||||
|
echo FirstStartMenuOptions "$FirstStartMenuOptions"
|
||||||
|
|
||||||
ReadmeText="`echo $ReadmeText | sed 's/\"/\\\\\\\\\"/g' | sed 's/[&%]//g'`"
|
ReadmeText="`echo $ReadmeText | sed 's/\"/\\\\\\\\\"/g' | sed 's/[&%]//g'`"
|
||||||
|
|
||||||
@@ -743,6 +761,7 @@ cat project/src/Globals.java | \
|
|||||||
sed "s/public static boolean InhibitSuspend = .*;/public static boolean InhibitSuspend = $InhibitSuspend;/" | \
|
sed "s/public static boolean InhibitSuspend = .*;/public static boolean InhibitSuspend = $InhibitSuspend;/" | \
|
||||||
sed "s/public static boolean AppUsesMouse = .*;/public static boolean AppUsesMouse = $AppUsesMouse;/" | \
|
sed "s/public static boolean AppUsesMouse = .*;/public static boolean AppUsesMouse = $AppUsesMouse;/" | \
|
||||||
sed "s/public static boolean AppNeedsTwoButtonMouse = .*;/public static boolean AppNeedsTwoButtonMouse = $AppNeedsTwoButtonMouse;/" | \
|
sed "s/public static boolean AppNeedsTwoButtonMouse = .*;/public static boolean AppNeedsTwoButtonMouse = $AppNeedsTwoButtonMouse;/" | \
|
||||||
|
sed "s/public static boolean ForceRelativeMouseMode = .*;/public static boolean ForceRelativeMouseMode = $ForceRelativeMouseMode;/" | \
|
||||||
sed "s/public static boolean AppNeedsArrowKeys = .*;/public static boolean AppNeedsArrowKeys = $AppNeedsArrowKeys;/" | \
|
sed "s/public static boolean AppNeedsArrowKeys = .*;/public static boolean AppNeedsArrowKeys = $AppNeedsArrowKeys;/" | \
|
||||||
sed "s/public static boolean AppNeedsTextInput = .*;/public static boolean AppNeedsTextInput = $AppNeedsTextInput;/" | \
|
sed "s/public static boolean AppNeedsTextInput = .*;/public static boolean AppNeedsTextInput = $AppNeedsTextInput;/" | \
|
||||||
sed "s/public static boolean AppUsesJoystick = .*;/public static boolean AppUsesJoystick = $AppUsesJoystick;/" | \
|
sed "s/public static boolean AppUsesJoystick = .*;/public static boolean AppUsesJoystick = $AppUsesJoystick;/" | \
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ class Globals {
|
|||||||
public static String CommandLine = "";
|
public static String CommandLine = "";
|
||||||
public static boolean AppUsesMouse = false;
|
public static boolean AppUsesMouse = false;
|
||||||
public static boolean AppNeedsTwoButtonMouse = false;
|
public static boolean AppNeedsTwoButtonMouse = false;
|
||||||
|
public static boolean ForceRelativeMouseMode = false; // If both on-screen keyboard and mouse are needed, this will only set the default setting, user may override it later
|
||||||
public static boolean AppNeedsArrowKeys = true;
|
public static boolean AppNeedsArrowKeys = true;
|
||||||
public static boolean AppNeedsTextInput = true;
|
public static boolean AppNeedsTextInput = true;
|
||||||
public static boolean AppUsesJoystick = false;
|
public static boolean AppUsesJoystick = false;
|
||||||
@@ -54,7 +55,7 @@ class Globals {
|
|||||||
public static int AppTouchscreenKeyboardKeysAmountAutoFire = 1;
|
public static int AppTouchscreenKeyboardKeysAmountAutoFire = 1;
|
||||||
public static int StartupMenuButtonTimeout = 3000;
|
public static int StartupMenuButtonTimeout = 3000;
|
||||||
public static Settings.Menu HiddenMenuOptions [] = {};
|
public static Settings.Menu HiddenMenuOptions [] = {};
|
||||||
public static Settings.Menu FirstStartMenuOptions [] = { (AppUsesMouse ? new Settings.DisplaySizeConfig(true) : new Settings.DummyMenu()), new Settings.OptionalDownloadConfig(true) };
|
public static Settings.Menu FirstStartMenuOptions [] = { (AppUsesMouse && ! ForceRelativeMouseMode ? new Settings.DisplaySizeConfig(true) : new Settings.DummyMenu()), new Settings.OptionalDownloadConfig(true) };
|
||||||
|
|
||||||
// Phone-specific config, modified by user in "Change phone config" startup dialog, TODO: move this to settings
|
// Phone-specific config, modified by user in "Change phone config" startup dialog, TODO: move this to settings
|
||||||
public static boolean DownloadToSdcard = true;
|
public static boolean DownloadToSdcard = true;
|
||||||
@@ -81,7 +82,7 @@ class Globals {
|
|||||||
public static int MoveMouseWithJoystickSpeed = 0;
|
public static int MoveMouseWithJoystickSpeed = 0;
|
||||||
public static int MoveMouseWithJoystickAccel = 0;
|
public static int MoveMouseWithJoystickAccel = 0;
|
||||||
public static boolean ClickMouseWithDpad = false;
|
public static boolean ClickMouseWithDpad = false;
|
||||||
public static boolean RelativeMouseMovement = false; // Laptop touchpad mode
|
public static boolean RelativeMouseMovement = ForceRelativeMouseMode; // Laptop touchpad mode
|
||||||
public static int RelativeMouseMovementSpeed = 2;
|
public static int RelativeMouseMovementSpeed = 2;
|
||||||
public static int RelativeMouseMovementAccel = 0;
|
public static int RelativeMouseMovementAccel = 0;
|
||||||
public static boolean ShowScreenUnderFinger = false;
|
public static boolean ShowScreenUnderFinger = false;
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ SdlVideoResizeKeepAspect=n
|
|||||||
CompatibilityHacks=n
|
CompatibilityHacks=n
|
||||||
AppUsesMouse=y
|
AppUsesMouse=y
|
||||||
AppNeedsTwoButtonMouse=y
|
AppNeedsTwoButtonMouse=y
|
||||||
|
ForceRelativeMouseMode=y
|
||||||
AppNeedsArrowKeys=y
|
AppNeedsArrowKeys=y
|
||||||
AppNeedsTextInput=y
|
AppNeedsTextInput=y
|
||||||
AppUsesJoystick=n
|
AppUsesJoystick=n
|
||||||
|
|||||||
Reference in New Issue
Block a user