From b542785ed95845089acb57817fd1ef7c0cf1822a Mon Sep 17 00:00:00 2001 From: Jonathan De Wachter Date: Fri, 20 Jun 2014 03:30:13 +0200 Subject: [PATCH] [Android] Keep the screen turned on and bright --- src/SFML/Main/MainAndroid.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/SFML/Main/MainAndroid.cpp b/src/SFML/Main/MainAndroid.cpp index d0de4b3bb..b3c681fe3 100644 --- a/src/SFML/Main/MainAndroid.cpp +++ b/src/SFML/Main/MainAndroid.cpp @@ -417,6 +417,10 @@ void ANativeActivity_onCreate(ANativeActivity* activity, void* savedState, size_ // Share this activity with the callback functions states->activity = activity; + // Keep the screen turned on and bright + ANativeActivity_setWindowFlags(activity, AWINDOW_FLAG_KEEP_SCREEN_ON, + AWINDOW_FLAG_KEEP_SCREEN_ON); + // Hide the status bar ANativeActivity_setWindowFlags(activity, AWINDOW_FLAG_FULLSCREEN, AWINDOW_FLAG_FULLSCREEN);