diff --git a/gfx/context/androidegl_ctx.c b/gfx/context/androidegl_ctx.c index d513c17fbf..1378cb4e1f 100644 --- a/gfx/context/androidegl_ctx.c +++ b/gfx/context/androidegl_ctx.c @@ -207,21 +207,14 @@ static void gfx_ctx_check_window(bool *quit, *quit = false; *resize = false; - if (g_android.reinit_video) - { - uninit_drivers(); - init_drivers(); - g_android.reinit_video = 0; - *resize = true; - } - - if (AConfiguration_getOrientation(g_android.app->config) != g_android.last_orient) + if (AConfiguration_getOrientation(g_android.app->config) != g_android.last_orient || g_android.reinit_video) { *resize = true; // reinit video driver for new window dimensions driver.video->free(driver.video_data); init_video_input(); g_android.last_orient = AConfiguration_getOrientation(g_android.app->config); + g_android.reinit_video = 0; } // Check if we are exiting.