Implement RARCH_CMD_RESET_CONTEXT

This commit is contained in:
twinaphex 2014-08-20 23:11:14 +02:00
parent 2f39784569
commit fe6add2f12
2 changed files with 6 additions and 2 deletions

View File

@ -123,6 +123,7 @@ enum basic_event
RARCH_CMD_VIDEO_SET_BLOCKING_STATE,
RARCH_CMD_VIDEO_SET_NONBLOCKING_STATE,
RARCH_CMD_VIDEO_SET_ASPECT_RATIO,
RARCH_CMD_RESET_CONTEXT,
};
enum menu_enums

View File

@ -2084,8 +2084,7 @@ static void set_fullscreen(bool fullscreen)
g_settings.video.fullscreen = fullscreen;
driver.video_cache_context = g_extern.system.hw_render_callback.cache_context;
driver.video_cache_context_ack = false;
uninit_drivers();
init_drivers();
rarch_main_command(RARCH_CMD_RESET_CONTEXT);
driver.video_cache_context = false;
/* Poll input to avoid possibly stale data to corrupt things. */
@ -3363,6 +3362,10 @@ void rarch_main_command(unsigned action)
g_settings.input.overlay_opacity);
#endif
break;
case RARCH_CMD_RESET_CONTEXT:
uninit_drivers();
init_drivers();
break;
}
}