Don't grab config pointer at beginning of rarch_main_iterate_time_to_exit
This commit is contained in:
parent
c0a1a6a3fe
commit
67e91033e2
18
runloop.c
18
runloop.c
|
@ -938,7 +938,6 @@ static void rarch_main_cmd_get_state(
|
||||||
*/
|
*/
|
||||||
static INLINE int rarch_main_iterate_time_to_exit(bool quit_key_pressed)
|
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;
|
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 || (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);
|
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))
|
if (runloop_ctl(RUNLOOP_CTL_IS_EXEC, NULL))
|
||||||
runloop_ctl(RUNLOOP_CTL_UNSET_EXEC, NULL);
|
runloop_ctl(RUNLOOP_CTL_UNSET_EXEC, NULL);
|
||||||
|
|
||||||
/* Quits out of RetroArch main loop.
|
if (runloop_ctl(RUNLOOP_CTL_IS_CORE_SHUTDOWN, NULL))
|
||||||
* 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)
|
|
||||||
{
|
{
|
||||||
|
/* 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))
|
if (!runloop_ctl(RUNLOOP_CTL_PREPARE_DUMMY, NULL))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue