mirror of
https://github.com/libretro/RetroArch
synced 2025-02-20 06:40:18 +00:00
(Android) Do window ready checking differently
This commit is contained in:
parent
3570ba80d2
commit
2e5f21db60
@ -34,6 +34,7 @@ struct droid
|
||||
unsigned height;
|
||||
struct saved_state state;
|
||||
int32_t last_orient;
|
||||
bool window_ready;
|
||||
float disp_refresh_rate;
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user