Should autosave state now at exit

This commit is contained in:
twinaphex 2016-07-01 06:55:44 +02:00
parent 241670cec2
commit dc4275b673
3 changed files with 27 additions and 19 deletions

View File

@ -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

View File

@ -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);
}

View File

@ -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