[Android] Hide the status bar
This commit is contained in:
parent
a4846db016
commit
a88bab1d59
@ -26,7 +26,7 @@
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Android specific: we define the ANativeActivity_onCreate
|
// Android specific: we define the ANativeActivity_onCreate
|
||||||
// entry point, handling all the native activity stuff, then
|
// 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
|
// an external thread so developers can keep a portable code
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@ -42,6 +42,8 @@
|
|||||||
#include <SFML/System/Sleep.hpp>
|
#include <SFML/System/Sleep.hpp>
|
||||||
#include <SFML/System/Thread.hpp>
|
#include <SFML/System/Thread.hpp>
|
||||||
#include <SFML/System/Lock.hpp>
|
#include <SFML/System/Lock.hpp>
|
||||||
|
#include <android/window.h>
|
||||||
|
#include <android/native_activity.h>
|
||||||
|
|
||||||
|
|
||||||
extern int main(int argc, char *argv[]);
|
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++)
|
for (unsigned int i = 0; i < sf::Mouse::ButtonCount; i++)
|
||||||
states->isButtonPressed[i] = false;
|
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
|
// 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
|
// 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
|
// Share this activity with the callback functions
|
||||||
states->activity = activity;
|
states->activity = activity;
|
||||||
|
|
||||||
|
// Hide the status bar
|
||||||
|
ANativeActivity_setWindowFlags(activity, AWINDOW_FLAG_FULLSCREEN,
|
||||||
|
AWINDOW_FLAG_FULLSCREEN);
|
||||||
|
|
||||||
// Initialize the display
|
// Initialize the display
|
||||||
eglInitialize(states->display, NULL, NULL);
|
eglInitialize(states->display, NULL, NULL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user