diff --git a/android/app/AndroidManifest.xml b/android/app/AndroidManifest.xml
index 5360a3fe..a7dd9f2e 100644
--- a/android/app/AndroidManifest.xml
+++ b/android/app/AndroidManifest.xml
@@ -76,9 +76,8 @@
android:theme="@style/AppTheme"
android:hardwareAccelerated="true" >
-
+
+
screen = std::make_unique(args, renderer.get(), theme);
-
+ bool is_background = false;
bool quit = false;
while (!quit) {
auto new_time = std::chrono::steady_clock::now();
@@ -131,6 +131,10 @@ int main(int argc, char** argv) {
if (event.type == SDL_EVENT_QUIT) {
quit = true;
break;
+ } else if (event.type == SDL_EVENT_WILL_ENTER_BACKGROUND) {
+ is_background = true;
+ } else if (event.type == SDL_EVENT_DID_ENTER_FOREGROUND) {
+ is_background = false;
}
if (screen->handleEvent(event)) {