Bug 2739 - [Android] No support for SDL_DisableScreenSaver by Martin Gerhardy
This commit is contained in:
1 parent
ec4dfdfc58
commit
79035b393a
4 files changed
+28
-1
No files matched your search
@@ -187,6 +187,13 @@ public class SDLActivity extends Activity {
|
||||
return super.dispatchKeyEvent(event);
|
||||
}
|
||||
|
||||
public static void suspendScreenSaver(boolean suspend) {
|
||||
if (suspend)
|
||||
mSingleton.getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||
else
|
||||
mSingleton.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||
}
|
||||
|
||||
/** Called by onPause or surfaceDestroyed. Even if surfaceDestroyed
|
||||
* is the first to be called, mIsSurfaceReady should still be set
|
||||
* to 'true' during the call to onPause (in a usual scenario).
|
||||
|
||||
Reference in new issue
Block a user