Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Android: Added a new method in SDLSurface.
  • Loading branch information
philippwiesemann committed Oct 7, 2015
1 parent 8671104 commit 5bc93cc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion android-project/src/org/libsdl/app/SDLActivity.java
Expand Up @@ -300,7 +300,7 @@ public static void handlePause() {
if (!SDLActivity.mIsPaused && SDLActivity.mIsSurfaceReady) {
SDLActivity.mIsPaused = true;
SDLActivity.nativePause();
mSurface.enableSensor(Sensor.TYPE_ACCELEROMETER, false);
mSurface.handlePause();
}
}

Expand Down Expand Up @@ -999,6 +999,10 @@ public SDLSurface(Context context) {
mHeight = 1.0f;
}

public void handlePause() {
enableSensor(Sensor.TYPE_ACCELEROMETER, false);
}

public void handleResume() {
setFocusable(true);
setFocusableInTouchMode(true);
Expand Down

0 comments on commit 5bc93cc

Please sign in to comment.