diff --git a/project/java/Globals.java b/project/java/Globals.java
index 77f3eaaf0..7d04fd7c8 100644
--- a/project/java/Globals.java
+++ b/project/java/Globals.java
@@ -66,18 +66,27 @@ class Globals {
public static final int LEFT_CLICK_WITH_MULTITOUCH = 2;
public static final int LEFT_CLICK_WITH_PRESSURE = 3;
public static final int LEFT_CLICK_WITH_KEY = 4;
- public static int LeftClickMethod = AppNeedsTwoButtonMouse ? LEFT_CLICK_NEAR_CURSOR : LEFT_CLICK_NORMAL;
+ public static final int LEFT_CLICK_WITH_TIMEOUT = 5;
+ public static final int LEFT_CLICK_WITH_TAP = 6;
+ public static final int LEFT_CLICK_WITH_TAP_OR_TIMEOUT = 7;
+ public static int LeftClickMethod = AppNeedsTwoButtonMouse ? LEFT_CLICK_WITH_TAP_OR_TIMEOUT : LEFT_CLICK_NORMAL;
public static int LeftClickKey = KeyEvent.KEYCODE_DPAD_CENTER;
+ public static int LeftClickTimeout = 3;
public static final int RIGHT_CLICK_NONE = 0;
public static final int RIGHT_CLICK_WITH_MULTITOUCH = 1;
public static final int RIGHT_CLICK_WITH_PRESSURE = 2;
public static final int RIGHT_CLICK_WITH_KEY = 3;
+ public static final int RIGHT_CLICK_WITH_TIMEOUT = 4;
+ public static int RightClickTimeout = 4;
public static int RightClickMethod = AppNeedsTwoButtonMouse ? RIGHT_CLICK_WITH_MULTITOUCH : RIGHT_CLICK_NONE;
public static int RightClickKey = KeyEvent.KEYCODE_MENU;
public static boolean MoveMouseWithJoystick = false;
public static int MoveMouseWithJoystickSpeed = 0;
public static int MoveMouseWithJoystickAccel = 0;
public static boolean ClickMouseWithDpad = false;
+ public static boolean RelativeMouseMovement = AppNeedsTwoButtonMouse; // Laptop touchpad mode
+ public static int RelativeMouseMovementSpeed = 0;
+ public static int RelativeMouseMovementAccel = 1;
public static boolean ShowScreenUnderFinger = AppNeedsTwoButtonMouse;
public static boolean KeepAspectRatio = false;
public static int ClickScreenPressure = 0;
@@ -91,7 +100,7 @@ class Globals {
public static int MultitouchGestureSensitivity = 1;
public static int TouchscreenCalibration[] = new int[4];
public static String DataDir = new String("");
- public static boolean SmoothVideo = true; // It looks nicer and doesn't take that much time if you have GFX accelerator
+ public static boolean SmoothVideo = false;
}
class LoadLibrary {
diff --git a/project/java/Settings.java b/project/java/Settings.java
index a6f5fe270..7633ce9ae 100644
--- a/project/java/Settings.java
+++ b/project/java/Settings.java
@@ -37,7 +37,7 @@ import android.text.Editable;
-// TODO: too much code here, split into multiple files
+// TODO: too much code here, split into multiple files, possibly auto-generated menus?
class Settings
{
static String SettingsFileName = "libsdl-settings.cfg";
@@ -111,6 +111,11 @@ class Settings
out.writeInt(Globals.LeftClickKey);
out.writeInt(Globals.RightClickKey);
out.writeBoolean(Globals.SmoothVideo);
+ out.writeInt(Globals.LeftClickTimeout);
+ out.writeInt(Globals.RightClickTimeout);
+ out.writeBoolean(Globals.RelativeMouseMovement);
+ out.writeInt(Globals.RelativeMouseMovementSpeed);
+ out.writeInt(Globals.RelativeMouseMovementAccel);
out.close();
settingsLoaded = true;
@@ -236,6 +241,11 @@ class Settings
Globals.LeftClickKey = settingsFile.readInt();
Globals.RightClickKey = settingsFile.readInt();
Globals.SmoothVideo = settingsFile.readBoolean();
+ Globals.LeftClickTimeout = settingsFile.readInt();
+ Globals.RightClickTimeout = settingsFile.readInt();
+ Globals.RelativeMouseMovement = settingsFile.readBoolean();
+ Globals.RelativeMouseMovementSpeed = settingsFile.readInt();
+ Globals.RelativeMouseMovementAccel = settingsFile.readInt();
settingsLoaded = true;
@@ -400,6 +410,13 @@ class Settings
}
}
});
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
AlertDialog alert = builder.create();
alert.setOwnerActivity(p);
alert.show();
@@ -474,6 +491,13 @@ class Settings
showConfigMainMenu(p);
}
});
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
AlertDialog alert = builder.create();
alert.setOwnerActivity(p);
alert.show();
@@ -530,6 +554,13 @@ class Settings
showConfigMainMenu(p);
}
});
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
AlertDialog alert = builder.create();
alert.setOwnerActivity(p);
alert.show();
@@ -570,6 +601,13 @@ class Settings
}
}
});
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
AlertDialog alert = builder.create();
alert.setOwnerActivity(p);
alert.show();
@@ -595,6 +633,13 @@ class Settings
showCommandLineConfig(p);
}
});
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
AlertDialog alert = builder.create();
alert.setOwnerActivity(p);
alert.show();
@@ -620,6 +665,13 @@ class Settings
showConfigMainMenu(p);
}
});
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
AlertDialog alert = builder.create();
alert.setOwnerActivity(p);
alert.show();
@@ -665,7 +717,13 @@ class Settings
showConfigMainMenu(p);
}
});
-
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
AlertDialog alert = builder.create();
alert.setOwnerActivity(p);
alert.show();
@@ -703,7 +761,13 @@ class Settings
showConfigMainMenu(p);
}
});
-
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
AlertDialog alert = builder.create();
alert.setOwnerActivity(p);
alert.show();
@@ -734,6 +798,13 @@ class Settings
showAccelerometerCenterConfig(p);
}
});
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
AlertDialog alert = builder.create();
alert.setOwnerActivity(p);
alert.show();
@@ -764,6 +835,13 @@ class Settings
showConfigMainMenu(p);
}
});
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
AlertDialog alert = builder.create();
alert.setOwnerActivity(p);
alert.show();
@@ -793,6 +871,13 @@ class Settings
showScreenKeyboardConfigMainMenu(p);
}
});
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
AlertDialog alert = builder.create();
alert.setOwnerActivity(p);
alert.show();
@@ -817,6 +902,13 @@ class Settings
showScreenKeyboardConfigMainMenu(p);
}
});
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
AlertDialog alert = builder.create();
alert.setOwnerActivity(p);
alert.show();
@@ -828,8 +920,7 @@ class Settings
p.getResources().getString(R.string.controls_screenkb_trans_1),
p.getResources().getString(R.string.controls_screenkb_trans_2),
p.getResources().getString(R.string.controls_screenkb_trans_3),
- p.getResources().getString(R.string.controls_screenkb_trans_4),
- };
+ p.getResources().getString(R.string.controls_screenkb_trans_4) };
AlertDialog.Builder builder = new AlertDialog.Builder(p);
builder.setTitle(p.getResources().getString(R.string.controls_screenkb_transparency));
@@ -843,6 +934,13 @@ class Settings
showScreenKeyboardConfigMainMenu(p);
}
});
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
AlertDialog alert = builder.create();
alert.setOwnerActivity(p);
alert.show();
@@ -866,6 +964,13 @@ class Settings
showConfigMainMenu(p);
}
});
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
AlertDialog alert = builder.create();
alert.setOwnerActivity(p);
alert.show();
@@ -883,7 +988,10 @@ class Settings
p.getResources().getString(R.string.leftclick_near_cursor),
p.getResources().getString(R.string.leftclick_multitouch),
p.getResources().getString(R.string.leftclick_pressure),
- p.getResources().getString(R.string.rightclick_key) };
+ p.getResources().getString(R.string.rightclick_key),
+ p.getResources().getString(R.string.leftclick_timeout),
+ p.getResources().getString(R.string.leftclick_tap),
+ p.getResources().getString(R.string.leftclick_tap_or_timeout) };
AlertDialog.Builder builder = new AlertDialog.Builder(p);
builder.setTitle(R.string.leftclick_question);
@@ -895,10 +1003,49 @@ class Settings
dialog.dismiss();
if( item == Globals.LEFT_CLICK_WITH_KEY )
p.keyListener = new KeyRemapToolMouseClick(p, true);
+ else if( item == Globals.LEFT_CLICK_WITH_TIMEOUT || item == Globals.LEFT_CLICK_WITH_TAP_OR_TIMEOUT )
+ showLeftClickTimeoutConfig(p);
else
showMouseConfigMainMenu(p);
}
});
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
+ AlertDialog alert = builder.create();
+ alert.setOwnerActivity(p);
+ alert.show();
+ }
+
+ static void showLeftClickTimeoutConfig(final MainActivity p) {
+ final CharSequence[] items = { p.getResources().getString(R.string.leftclick_timeout_time_0),
+ p.getResources().getString(R.string.leftclick_timeout_time_1),
+ p.getResources().getString(R.string.leftclick_timeout_time_2),
+ p.getResources().getString(R.string.leftclick_timeout_time_3),
+ p.getResources().getString(R.string.leftclick_timeout_time_4) };
+
+ AlertDialog.Builder builder = new AlertDialog.Builder(p);
+ builder.setTitle(R.string.leftclick_timeout_time);
+ builder.setSingleChoiceItems(items, Globals.LeftClickTimeout, new DialogInterface.OnClickListener()
+ {
+ public void onClick(DialogInterface dialog, int item)
+ {
+ Globals.LeftClickTimeout = item;
+ dialog.dismiss();
+ showMouseConfigMainMenu(p);
+ }
+ });
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
AlertDialog alert = builder.create();
alert.setOwnerActivity(p);
alert.show();
@@ -915,7 +1062,8 @@ class Settings
final CharSequence[] items = { p.getResources().getString(R.string.rightclick_none),
p.getResources().getString(R.string.rightclick_multitouch),
p.getResources().getString(R.string.rightclick_pressure),
- p.getResources().getString(R.string.rightclick_key) };
+ p.getResources().getString(R.string.rightclick_key),
+ p.getResources().getString(R.string.leftclick_timeout) };
AlertDialog.Builder builder = new AlertDialog.Builder(p);
builder.setTitle(R.string.rightclick_question);
@@ -927,10 +1075,49 @@ class Settings
dialog.dismiss();
if( item == Globals.RIGHT_CLICK_WITH_KEY )
p.keyListener = new KeyRemapToolMouseClick(p, false);
+ else if( item == Globals.RIGHT_CLICK_WITH_TIMEOUT )
+ showRightClickTimeoutConfig(p);
else
showMouseConfigMainMenu(p);
}
});
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
+ AlertDialog alert = builder.create();
+ alert.setOwnerActivity(p);
+ alert.show();
+ }
+
+ static void showRightClickTimeoutConfig(final MainActivity p) {
+ final CharSequence[] items = { p.getResources().getString(R.string.leftclick_timeout_time_0),
+ p.getResources().getString(R.string.leftclick_timeout_time_1),
+ p.getResources().getString(R.string.leftclick_timeout_time_2),
+ p.getResources().getString(R.string.leftclick_timeout_time_3),
+ p.getResources().getString(R.string.leftclick_timeout_time_4) };
+
+ AlertDialog.Builder builder = new AlertDialog.Builder(p);
+ builder.setTitle(R.string.leftclick_timeout_time);
+ builder.setSingleChoiceItems(items, Globals.RightClickTimeout, new DialogInterface.OnClickListener()
+ {
+ public void onClick(DialogInterface dialog, int item)
+ {
+ Globals.RightClickTimeout = item;
+ dialog.dismiss();
+ showMouseConfigMainMenu(p);
+ }
+ });
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
AlertDialog alert = builder.create();
alert.setOwnerActivity(p);
alert.show();
@@ -970,19 +1157,21 @@ class Settings
CharSequence[] items = {
p.getResources().getString(R.string.pointandclick_showcreenunderfinger2),
p.getResources().getString(R.string.pointandclick_joystickmouse),
- p.getResources().getString(R.string.click_with_dpadcenter)
+ p.getResources().getString(R.string.click_with_dpadcenter),
+ p.getResources().getString(R.string.pointandclick_relative)
};
boolean defaults[] = {
Globals.ShowScreenUnderFinger,
Globals.MoveMouseWithJoystick,
- Globals.ClickMouseWithDpad
+ Globals.ClickMouseWithDpad,
+ Globals.RelativeMouseMovement
};
AlertDialog.Builder builder = new AlertDialog.Builder(p);
builder.setTitle(p.getResources().getString(R.string.pointandclick_question));
- builder.setMultiChoiceItems(items, defaults, new DialogInterface.OnMultiChoiceClickListener()
+ builder.setMultiChoiceItems(items, defaults, new DialogInterface.OnMultiChoiceClickListener()
{
public void onClick(DialogInterface dialog, int item, boolean isChecked)
{
@@ -992,17 +1181,58 @@ class Settings
Globals.MoveMouseWithJoystick = isChecked;
if( item == 2 )
Globals.ClickMouseWithDpad = isChecked;
+ if( item == 3 )
+ Globals.RelativeMouseMovement = isChecked;
}
});
- builder.setPositiveButton(p.getResources().getString(R.string.ok), new DialogInterface.OnClickListener()
+ builder.setPositiveButton(p.getResources().getString(R.string.ok), new DialogInterface.OnClickListener()
{
public void onClick(DialogInterface dialog, int item)
{
dialog.dismiss();
- showMouseConfigMainMenu(p);
+ if( Globals.RelativeMouseMovement )
+ showRelativeMouseMovementConfig(p);
+ else
+ showMouseConfigMainMenu(p);
}
});
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
+ AlertDialog alert = builder.create();
+ alert.setOwnerActivity(p);
+ alert.show();
+ }
+ static void showRelativeMouseMovementConfig1(final MainActivity p)
+ {
+ final CharSequence[] items = { p.getResources().getString(R.string.accel_fast),
+ p.getResources().getString(R.string.accel_medium),
+ p.getResources().getString(R.string.accel_slow) };
+
+ AlertDialog.Builder builder = new AlertDialog.Builder(p);
+ builder.setTitle(R.string.pointandclick_relative_accel);
+ builder.setSingleChoiceItems(items, Globals.RelativeMouseMovementAccel, new DialogInterface.OnClickListener()
+ {
+ public void onClick(DialogInterface dialog, int item)
+ {
+ Globals.RelativeMouseMovementAccel = item;
+
+ dialog.dismiss();
+ showConfigMainMenu(p);
+ }
+ });
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
AlertDialog alert = builder.create();
alert.setOwnerActivity(p);
alert.show();
@@ -1036,6 +1266,13 @@ class Settings
showTrackballConfig(p);
}
});
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
AlertDialog alert = builder.create();
alert.setOwnerActivity(p);
alert.show();
@@ -1067,6 +1304,13 @@ class Settings
showConfigMainMenu(p);
}
});
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
AlertDialog alert = builder.create();
alert.setOwnerActivity(p);
alert.show();
@@ -1097,6 +1341,13 @@ class Settings
showJoystickMouseAccelConfig(p);
}
});
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
AlertDialog alert = builder.create();
alert.setOwnerActivity(p);
alert.show();
@@ -1128,6 +1379,13 @@ class Settings
showMouseConfigMainMenu(p);
}
});
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
AlertDialog alert = builder.create();
alert.setOwnerActivity(p);
alert.show();
@@ -1236,6 +1494,13 @@ class Settings
showConfigMainMenu(p);
}
});
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
AlertDialog alert = builder.create();
alert.setOwnerActivity(p);
alert.show();
@@ -1285,7 +1550,13 @@ class Settings
showRemapScreenKbConfig2(p, 0);
}
});
-
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
AlertDialog alert = builder.create();
alert.setOwnerActivity(p);
alert.show();
@@ -1325,6 +1596,13 @@ class Settings
showRemapScreenKbConfig2(p, currentButton + 1);
}
});
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
AlertDialog alert = builder.create();
alert.setOwnerActivity(p);
alert.show();
@@ -1363,7 +1641,13 @@ class Settings
showScreenGesturesConfig2(p);
}
});
-
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
AlertDialog alert = builder.create();
alert.setOwnerActivity(p);
alert.show();
@@ -1390,6 +1674,13 @@ class Settings
showScreenGesturesConfig3(p, 0);
}
});
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
AlertDialog alert = builder.create();
alert.setOwnerActivity(p);
alert.show();
@@ -1427,6 +1718,13 @@ class Settings
showScreenGesturesConfig3(p, currentButton + 1);
}
});
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
AlertDialog alert = builder.create();
alert.setOwnerActivity(p);
alert.show();
@@ -1665,7 +1963,13 @@ class Settings
showConfigMainMenu(p);
}
});
-
+ builder.setOnCancelListener(new DialogInterface.OnCancelListener()
+ {
+ public void onCancel(DialogInterface dialog)
+ {
+ showConfigMainMenu(p);
+ }
+ });
AlertDialog alert = builder.create();
alert.setOwnerActivity(p);
alert.show();
@@ -1690,7 +1994,12 @@ class Settings
Globals.MoveMouseWithJoystickSpeed,
Globals.MoveMouseWithJoystickAccel,
Globals.LeftClickKey,
- Globals.RightClickKey );
+ Globals.RightClickKey,
+ Globals.LeftClickTimeout,
+ Globals.RightClickTimeout,
+ Globals.RelativeMouseMovement,
+ Globals.RelativeMouseMovementSpeed,
+ Globals.RelativeMouseMovementAccel );
if( Globals.AppUsesJoystick && (Globals.UseAccelerometerAsArrowKeys || Globals.UseTouchscreenKeyboard) )
nativeSetJoystickUsed();
if( Globals.AppUsesMultitouch )
@@ -1786,7 +2095,9 @@ class Settings
private static native void nativeSetMouseUsed(int RightClickMethod, int ShowScreenUnderFinger, int LeftClickMethod,
int MoveMouseWithJoystick, int ClickMouseWithDpad, int MaxForce, int MaxRadius,
int MoveMouseWithJoystickSpeed, int MoveMouseWithJoystickAccel,
- int leftClickKeycode, int rightClickKeycode);
+ int leftClickKeycode, int rightClickKeycode,
+ int leftClickTimeout, int rightClickTimeout,
+ int relativeMovement, int relativeMovementSpeed, int relativeMovementAccel);
private static native void nativeSetJoystickUsed();
private static native void nativeSetMultitouchUsed();
private static native void nativeSetTouchscreenKeyboardUsed();
diff --git a/project/java/Video.java b/project/java/Video.java
index 9d44b9cf9..1e64a9f6f 100644
--- a/project/java/Video.java
+++ b/project/java/Video.java
@@ -219,9 +219,7 @@ class DemoRenderer extends GLSurfaceView_SDL.Renderer {
public int swapBuffers() // Called from native code
{
- synchronized (this) {
- this.notify();
- }
+ this.notify();
if( ! super.SwapBuffers() && Globals.NonBlockingSwapBuffers )
return 0;
if(mGlContextLost) {
@@ -301,7 +299,7 @@ class DemoGLSurfaceView extends GLSurfaceView_SDL {
{
touchInput.process(event);
// Wait a bit, and try to synchronize to app framerate, or event thread will eat all CPU and we'll lose FPS
- synchronized (mRenderer) {
+ if( event.getAction() == MotionEvent.ACTION_MOVE ) {
try {
mRenderer.wait(300L);
} catch (InterruptedException e) { }
diff --git a/project/java/translations/values/strings.xml b/project/java/translations/values/strings.xml
index 4038efd6c..0cab65010 100644
--- a/project/java/translations/values/strings.xml
+++ b/project/java/translations/values/strings.xml
@@ -82,6 +82,15 @@
Touch screen with second finger
Touch screen with force
Trackball click / joystick center
+ Hold at the same spot
+ Tap
+ Tap or hold
+ Holding timeout
+ 0.3 sec
+ 0.5 sec
+ 0.7 sec
+ 1 sec
+ 1.5 sec
Left mouse click with trackball / joystick center
Advanced features
@@ -91,6 +100,10 @@
Move mouse with joystick or trackball
Move mouse with joystick speed
Move mouse with joystick acceleration
+ Relative mouse movement (laptop mode)
+ Relative mouse movement speed
+ Relative mouse movement acceleration
+
None
Calibrate touchscreen pressure
diff --git a/project/jni/sdl-1.3/src/video/android/SDL_androidinput.c b/project/jni/sdl-1.3/src/video/android/SDL_androidinput.c
index 53f009ee9..6556b236f 100644
--- a/project/jni/sdl-1.3/src/video/android/SDL_androidinput.c
+++ b/project/jni/sdl-1.3/src/video/android/SDL_androidinput.c
@@ -550,7 +550,9 @@ JAVA_EXPORT_NAME(Settings_nativeSetMouseUsed) ( JNIEnv* env, jobject thiz,
jint MoveMouseWithJoystick, jint ClickMouseWithDpad,
jint MaxForce, jint MaxRadius,
jint MoveMouseWithJoystickSpeed, jint MoveMouseWithJoystickAccel,
- jint LeftClickKeycode, jint RightClickKeycode)
+ jint LeftClickKeycode, jint RightClickKeycode,
+ jint LeftClickTimeout, jint RghtClickTimeout,
+ jint RelativeMovement, jint RelativeMovementSpeed, jint RelativeMovementAccel)
{
isMouseUsed = 1;
rightClickMethod = RightClickMethod;