diff --git a/android/native/jni/android_general.h b/android/native/jni/android_general.h index 5edd3051cd..616e7f3ee8 100644 --- a/android/native/jni/android_general.h +++ b/android/native/jni/android_general.h @@ -34,6 +34,7 @@ struct droid unsigned height; struct saved_state state; int32_t last_orient; + bool window_ready; float disp_refresh_rate; }; diff --git a/android/native/jni/main.c b/android/native/jni/main.c index bb3d013bdb..3eb9f190e0 100644 --- a/android/native/jni/main.c +++ b/android/native/jni/main.c @@ -222,7 +222,7 @@ void engine_handle_cmd(struct android_app* android_app, int32_t cmd) if(g_extern.lifecycle_state & (1ULL << RARCH_REENTRANT)) { uninit_drivers(); - g_extern.lifecycle_state &= ~(1ULL << RARCH_WINDOW_READY); + g_android.window_ready = false; } /* POSTEXEC */ @@ -282,7 +282,7 @@ bool android_run_events(struct android_app* android_app) init_drivers(); if (android_app->window != NULL) - g_extern.lifecycle_state |= (1ULL << RARCH_WINDOW_READY); + g_android.window_ready = true; } } @@ -414,7 +414,7 @@ static void* android_app_entry(void* param) RARCH_LOG("Setting RetroArch video refresh rate to: %.2fHz.\n", g_android.disp_refresh_rate); - while(!(g_extern.lifecycle_state & (1ULL << RARCH_WINDOW_READY))) + while(!g_android.window_ready) { if(!android_run_events(android_app)) goto exit; diff --git a/driver.h b/driver.h index 1b87d5554e..a9b77b2482 100644 --- a/driver.h +++ b/driver.h @@ -103,9 +103,6 @@ enum // RetroArch specific bind IDs. RARCH_CHEAT_INPUT, RARCH_SRAM_WRITE_PROTECT, #endif -#ifdef ANDROID - RARCH_WINDOW_READY, -#endif #ifdef HAVE_RMENU RARCH_RMENU_TOGGLE, RARCH_RMENU_QUICKMENU_TOGGLE,