mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 00:20:01 +00:00
Pressing hotkey should invoke same operation as manually selecting
'Quit' from the menu - should hopefully fix issues with flushing SRAM to disk/saving autostate
This commit is contained in:
parent
fb78a3a017
commit
0815055906
@ -1756,7 +1756,7 @@ static bool command_event_main_state(unsigned cmd)
|
||||
return ret;
|
||||
}
|
||||
|
||||
void handle_quit_event(void)
|
||||
bool command_event_quit(void)
|
||||
{
|
||||
command_event(CMD_EVENT_AUTOSAVE_STATE, NULL);
|
||||
command_event(CMD_EVENT_DISABLE_OVERRIDES, NULL);
|
||||
@ -1772,6 +1772,8 @@ void handle_quit_event(void)
|
||||
#ifdef HAVE_MENU
|
||||
rarch_ctl(RARCH_CTL_MENU_RUNNING_FINISHED, NULL);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool command_event_resize_windowed_scale(void)
|
||||
@ -1993,8 +1995,7 @@ bool command_event(enum event_command cmd, void *data)
|
||||
}
|
||||
break;
|
||||
case CMD_EVENT_QUIT:
|
||||
handle_quit_event();
|
||||
break;
|
||||
return command_event_quit();
|
||||
case CMD_EVENT_CHEEVOS_HARDCORE_MODE_TOGGLE:
|
||||
#ifdef HAVE_CHEEVOS
|
||||
cheevos_toggle_hardcore_mode();
|
||||
|
@ -243,6 +243,8 @@ bool command_set(command_handle_t *handle);
|
||||
|
||||
bool command_free(command_t *handle);
|
||||
|
||||
bool command_event_quit(void);
|
||||
|
||||
/**
|
||||
* command_event:
|
||||
* @cmd : Command index.
|
||||
|
@ -56,6 +56,7 @@
|
||||
#endif
|
||||
|
||||
#include "autosave.h"
|
||||
#include "command.h"
|
||||
#include "configuration.h"
|
||||
#include "driver.h"
|
||||
#include "movie.h"
|
||||
@ -758,7 +759,10 @@ static enum runloop_state runloop_check_state(
|
||||
runloop_core_shutdown_initiated = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
command_event_quit();
|
||||
return RUNLOOP_STATE_QUIT;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
|
Loading…
Reference in New Issue
Block a user