mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2025-01-26 12:59:18 +01:00
Android: Added a new method in SDLSurface.
This commit is contained in:
parent
86711041f2
commit
5bc93cc5c6
@ -300,7 +300,7 @@ public class SDLActivity extends Activity {
|
||||
if (!SDLActivity.mIsPaused && SDLActivity.mIsSurfaceReady) {
|
||||
SDLActivity.mIsPaused = true;
|
||||
SDLActivity.nativePause();
|
||||
mSurface.enableSensor(Sensor.TYPE_ACCELEROMETER, false);
|
||||
mSurface.handlePause();
|
||||
}
|
||||
}
|
||||
|
||||
@ -999,6 +999,10 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
||||
mHeight = 1.0f;
|
||||
}
|
||||
|
||||
public void handlePause() {
|
||||
enableSensor(Sensor.TYPE_ACCELEROMETER, false);
|
||||
}
|
||||
|
||||
public void handleResume() {
|
||||
setFocusable(true);
|
||||
setFocusableInTouchMode(true);
|
||||
|
Loading…
Reference in New Issue
Block a user