mirror of
https://github.com/libretro/RetroArch
synced 2025-03-01 16:13:40 +00:00
Fix 'Dummy on Core Shutdown' setting
This commit is contained in:
parent
6c5b2ff0b5
commit
3abbe15637
25
runloop.c
25
runloop.c
@ -1171,6 +1171,18 @@ static void runloop_iterate_linefeed_overlay(settings_t *settings)
|
||||
#endif
|
||||
|
||||
|
||||
/* Loads dummy core instead of exiting RetroArch completely.
|
||||
* Aborts core shutdown if invoked. */
|
||||
static int runloop_iterate_time_to_exit_load_dummy(void)
|
||||
{
|
||||
if (!runloop_ctl(RUNLOOP_CTL_PREPARE_DUMMY, NULL))
|
||||
return -1;
|
||||
|
||||
runloop_ctl(RUNLOOP_CTL_UNSET_SHUTDOWN, NULL);
|
||||
runloop_ctl(RUNLOOP_CTL_UNSET_CORE_SHUTDOWN, NULL);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Time to exit out of the main loop?
|
||||
* Reasons for exiting:
|
||||
@ -1198,23 +1210,14 @@ static INLINE int runloop_iterate_time_to_exit(bool quit_key_pressed)
|
||||
if (!runloop_ctl(RUNLOOP_CTL_IS_CORE_SHUTDOWN, NULL))
|
||||
return -1;
|
||||
|
||||
/* Quits out of RetroArch main loop.
|
||||
* On special case, loads dummy core
|
||||
* instead of exiting RetroArch completely.
|
||||
* Aborts core shutdown if invoked.
|
||||
*/
|
||||
/* Quits out of RetroArch main loop. */
|
||||
|
||||
settings = config_get_ptr();
|
||||
|
||||
if (!settings->load_dummy_on_core_shutdown)
|
||||
return -1;
|
||||
if (!runloop_ctl(RUNLOOP_CTL_PREPARE_DUMMY, NULL))
|
||||
return -1;
|
||||
|
||||
runloop_ctl(RUNLOOP_CTL_UNSET_SHUTDOWN, NULL);
|
||||
runloop_ctl(RUNLOOP_CTL_UNSET_CORE_SHUTDOWN, NULL);
|
||||
|
||||
return 0;
|
||||
return runloop_iterate_time_to_exit_load_dummy();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user