Don't grab config pointer at beginning of rarch_main_iterate_time_to_exit

This commit is contained in:
twinaphex 2015-12-04 12:48:33 +01:00
parent c0a1a6a3fe
commit 67e91033e2

View File

@ -938,7 +938,6 @@ static void rarch_main_cmd_get_state(
*/
static INLINE int rarch_main_iterate_time_to_exit(bool quit_key_pressed)
{
settings_t *settings = config_get_ptr();
bool time_to_exit = runloop_ctl(RUNLOOP_CTL_IS_SHUTDOWN, NULL) || quit_key_pressed;
time_to_exit = time_to_exit || (video_driver_ctl(RARCH_DISPLAY_CTL_IS_ALIVE, NULL) == false);
time_to_exit = time_to_exit || bsv_movie_ctl(BSV_MOVIE_CTL_END_EOF, NULL);
@ -951,14 +950,17 @@ static INLINE int rarch_main_iterate_time_to_exit(bool quit_key_pressed)
if (runloop_ctl(RUNLOOP_CTL_IS_EXEC, NULL))
runloop_ctl(RUNLOOP_CTL_UNSET_EXEC, NULL);
/* Quits out of RetroArch main loop.
* On special case, loads dummy core
* instead of exiting RetroArch completely.
* Aborts core shutdown if invoked.
*/
if (runloop_ctl(RUNLOOP_CTL_IS_CORE_SHUTDOWN, NULL)
&& settings->load_dummy_on_core_shutdown)
if (runloop_ctl(RUNLOOP_CTL_IS_CORE_SHUTDOWN, NULL))
{
/* Quits out of RetroArch main loop.
* On special case, loads dummy core
* instead of exiting RetroArch completely.
* Aborts core shutdown if invoked.
*/
settings_t *settings = config_get_ptr();
if (!settings->load_dummy_on_core_shutdown)
return -1;
if (!runloop_ctl(RUNLOOP_CTL_PREPARE_DUMMY, NULL))
return -1;