From a88bab1d59edba4c2df1eac1e8a798d02fdd7eba Mon Sep 17 00:00:00 2001 From: Jonathan De Wachter Date: Fri, 20 Jun 2014 03:27:49 +0200 Subject: [PATCH] [Android] Hide the status bar --- src/SFML/Main/MainAndroid.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/SFML/Main/MainAndroid.cpp b/src/SFML/Main/MainAndroid.cpp index d835e38f..1e55fc53 100644 --- a/src/SFML/Main/MainAndroid.cpp +++ b/src/SFML/Main/MainAndroid.cpp @@ -26,7 +26,7 @@ //////////////////////////////////////////////////////////// // Android specific: we define the ANativeActivity_onCreate // entry point, handling all the native activity stuff, then -// we call the user defined (and poratble) main function in +// we call the user defined (and portable) main function in // an external thread so developers can keep a portable code //////////////////////////////////////////////////////////// @@ -42,6 +42,8 @@ #include #include #include +#include +#include extern int main(int argc, char *argv[]); @@ -367,8 +369,8 @@ void ANativeActivity_onCreate(ANativeActivity* activity, void* savedState, size_ for (unsigned int i = 0; i < sf::Mouse::ButtonCount; i++) states->isButtonPressed[i] = false; - - states->display = eglGetDisplay(EGL_DEFAULT_DISPLAY); + + states->display = eglGetDisplay(EGL_DEFAULT_DISPLAY); // As the input queue will be created before the SFML window, we need to use // this dummy function that will be replaced later by the first created @@ -415,6 +417,10 @@ void ANativeActivity_onCreate(ANativeActivity* activity, void* savedState, size_ // Share this activity with the callback functions states->activity = activity; + // Hide the status bar + ANativeActivity_setWindowFlags(activity, AWINDOW_FLAG_FULLSCREEN, + AWINDOW_FLAG_FULLSCREEN); + // Initialize the display eglInitialize(states->display, NULL, NULL);