mirror of
https://github.com/libretro/RetroArch
synced 2025-02-20 15:40:44 +00:00
(Android) Refactor context restore and video orientation change
code - context restore only needs to restore video and not all drivers
This commit is contained in:
parent
0dce6a6db6
commit
f81ee3be30
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user