From 497eaf090b1665511c795d5764c06a2bcd4b90b6 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Thu, 13 Nov 2014 22:46:48 +0200 Subject: [PATCH] Expose window flags and set fullscreen mode by default I'll likely change the default once I figure out a good way to add fullscreen support to libmspgui on Android. --- source/core/android/mainthread.cpp | 8 ++++++++ source/core/android/mainthread.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/source/core/android/mainthread.cpp b/source/core/android/mainthread.cpp index d394f83..255eaa3 100644 --- a/source/core/android/mainthread.cpp +++ b/source/core/android/mainthread.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -32,6 +33,8 @@ void MainThread::attach_to_activity(ANativeActivity *a) activity->callbacks->onInputQueueCreated = &input_queue_created; activity->callbacks->onInputQueueDestroyed = &input_queue_destroyed; activity->instance = this; + + set_window_flags(AWINDOW_FLAG_FULLSCREEN, 0); } void MainThread::wait_for_app_created() @@ -48,6 +51,11 @@ void MainThread::resume_startup() } } +void MainThread::set_window_flags(unsigned set, unsigned clear) +{ + ANativeActivity_setWindowFlags(activity, set, clear); +} + void MainThread::main() { /* I have no idea how dependable this is, but it seems to be the only way diff --git a/source/core/android/mainthread.h b/source/core/android/mainthread.h index 09f907f..22309ee 100644 --- a/source/core/android/mainthread.h +++ b/source/core/android/mainthread.h @@ -37,6 +37,8 @@ public: AAssetManager *get_asset_manager() const { return asset_manager; } const FS::Path &get_internal_data_path() const { return int_data_path; } + void set_window_flags(unsigned, unsigned); + private: virtual void main(); -- 2.43.0