mirror of https://github.com/encounter/SDL.git
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