Android: Added a new method in SDLSurface.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Wed, 07 Oct 2015 21:16:40 +0200
changeset 9891c8dd60b666ed
parent 9890 e61454ebd77a
child 9892 f8e6273be2fa
Android: Added a new method in SDLSurface.
android-project/src/org/libsdl/app/SDLActivity.java
     1.1 --- a/android-project/src/org/libsdl/app/SDLActivity.java	Wed Oct 07 21:16:18 2015 +0200
     1.2 +++ b/android-project/src/org/libsdl/app/SDLActivity.java	Wed Oct 07 21:16:40 2015 +0200
     1.3 @@ -300,7 +300,7 @@
     1.4          if (!SDLActivity.mIsPaused && SDLActivity.mIsSurfaceReady) {
     1.5              SDLActivity.mIsPaused = true;
     1.6              SDLActivity.nativePause();
     1.7 -            mSurface.enableSensor(Sensor.TYPE_ACCELEROMETER, false);
     1.8 +            mSurface.handlePause();
     1.9          }
    1.10      }
    1.11  
    1.12 @@ -999,6 +999,10 @@
    1.13          mHeight = 1.0f;
    1.14      }
    1.15  
    1.16 +    public void handlePause() {
    1.17 +        enableSensor(Sensor.TYPE_ACCELEROMETER, false);
    1.18 +    }
    1.19 +
    1.20      public void handleResume() {
    1.21          setFocusable(true);
    1.22          setFocusableInTouchMode(true);