mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-03 08:10:52 +00:00
Should autosave state now at exit
This commit is contained in:
parent
241670cec2
commit
dc4275b673
38
command.c
38
command.c
@ -1894,21 +1894,37 @@ bool command_event(enum event_command cmd, void *data)
|
||||
return false;
|
||||
break;
|
||||
case CMD_EVENT_UNLOAD_CORE:
|
||||
case CMD_EVENT_QUIT:
|
||||
command_event(CMD_EVENT_AUTOSAVE_STATE, NULL);
|
||||
command_event(CMD_EVENT_DISABLE_OVERRIDES, NULL);
|
||||
|
||||
if (content_is_inited())
|
||||
if (!task_push_content_load_default(
|
||||
NULL, NULL,
|
||||
&content_info,
|
||||
CORE_TYPE_DUMMY,
|
||||
CONTENT_MODE_LOAD_NOTHING_WITH_DUMMY_CORE,
|
||||
NULL, NULL))
|
||||
return false;
|
||||
switch (cmd)
|
||||
{
|
||||
case CMD_EVENT_UNLOAD_CORE:
|
||||
if (content_is_inited())
|
||||
if (!task_push_content_load_default(
|
||||
NULL, NULL,
|
||||
&content_info,
|
||||
CORE_TYPE_DUMMY,
|
||||
CONTENT_MODE_LOAD_NOTHING_WITH_DUMMY_CORE,
|
||||
NULL, NULL))
|
||||
return false;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
command_event(CMD_EVENT_LOAD_CORE_DEINIT, NULL);
|
||||
break;
|
||||
case CMD_EVENT_QUIT:
|
||||
retroarch_main_quit();
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
case CMD_EVENT_QUIT:
|
||||
runloop_ctl(RUNLOOP_CTL_SET_SHUTDOWN, NULL);
|
||||
rarch_ctl(RARCH_CTL_MENU_RUNNING_FINISHED, NULL);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case CMD_EVENT_CHEEVOS_HARDCORE_MODE_TOGGLE:
|
||||
#ifdef HAVE_CHEEVOS
|
||||
|
@ -1689,9 +1689,3 @@ void retroarch_fail(int error_code, const char *error)
|
||||
strlcpy(error_string, error, sizeof(error_string));
|
||||
longjmp(error_sjlj_context, error_code);
|
||||
}
|
||||
|
||||
void retroarch_main_quit(void)
|
||||
{
|
||||
runloop_ctl(RUNLOOP_CTL_SET_SHUTDOWN, NULL);
|
||||
rarch_ctl(RARCH_CTL_MENU_RUNNING_FINISHED, NULL);
|
||||
}
|
||||
|
@ -150,8 +150,6 @@ void retroarch_fail(int error_code, const char *error);
|
||||
**/
|
||||
bool retroarch_main_init(int argc, char *argv[]);
|
||||
|
||||
void retroarch_main_quit(void);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user