Fixed gyroscope calibration not saved to settings file, fixes to gyroscope mouse input - it still does not work with finger hover

This commit is contained in:
pelya
2014-04-21 20:30:52 +03:00
parent 343bfe673a
commit 0c5df7594c
12 changed files with 68 additions and 44 deletions

View File

@@ -657,6 +657,8 @@ class DemoRenderer extends GLSurfaceView_SDL.Renderer
Settings.nativeSetEnv( "DISPLAY_RESOLUTION_HEIGHT", String.valueOf(Math.min(mWidth, mHeight)) ); // In Kitkat with immersive mode, getWindowManager().getDefaultDisplay().getMetrics() return inaccurate height
accelerometer = new AccelerometerReader(context);
if( Globals.MoveMouseWithGyroscope )
startAccelerometerGyroscope(1);
// Tweak video thread priority, if user selected big audio buffer
if(Globals.AudioBufferConfig >= 2)
Thread.currentThread().setPriority( (Thread.NORM_PRIORITY + Thread.MIN_PRIORITY) / 2 ); // Lower than normal
@@ -760,12 +762,12 @@ class DemoRenderer extends GLSurfaceView_SDL.Renderer
return context.isScreenKeyboardShown() ? 1 : 0;
}
public void setScreenKeyboardHintMessage(String s)
public void setScreenKeyboardHintMessage(String s) // Called from native code
{
context.setScreenKeyboardHintMessage(s);
}
public void startAccelerometerGyroscope(int started)
public void startAccelerometerGyroscope(int started) // Called from native code
{
accelerometer.openedBySDL = (started != 0);
if( accelerometer.openedBySDL && !mPaused )