Android: Added a new method in SDLSurface.
diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java
index 17133fb..544d0c2 100644
--- a/android-project/src/org/libsdl/app/SDLActivity.java
+++ b/android-project/src/org/libsdl/app/SDLActivity.java
@@ -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);