[Android] Keep the screen turned on and bright

This commit is contained in:
Jonathan De Wachter 2014-06-20 03:30:13 +02:00
parent f0345d5201
commit b542785ed9

View File

@ -417,6 +417,10 @@ void ANativeActivity_onCreate(ANativeActivity* activity, void* savedState, size_
// Share this activity with the callback functions // Share this activity with the callback functions
states->activity = activity; 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 // Hide the status bar
ANativeActivity_setWindowFlags(activity, AWINDOW_FLAG_FULLSCREEN, ANativeActivity_setWindowFlags(activity, AWINDOW_FLAG_FULLSCREEN,
AWINDOW_FLAG_FULLSCREEN); AWINDOW_FLAG_FULLSCREEN);