mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 08:30:16 +00:00
Prevent runahead from being disabled *permanently* when an error occurs
This commit is contained in:
parent
e91e548f13
commit
dc6f0fd0b3
17
retroarch.c
17
retroarch.c
@ -15590,6 +15590,10 @@ static bool input_driver_ungrab_mouse(struct rarch_state *p_rarch)
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Forward declaration */
|
||||
#ifdef HAVE_RUNAHEAD
|
||||
static void runahead_clear_variables(struct rarch_state *p_rarch);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* command_event:
|
||||
@ -16281,6 +16285,19 @@ bool command_event(enum event_command cmd, void *data)
|
||||
#endif
|
||||
command_event_deinit_core(p_rarch, true);
|
||||
|
||||
#ifdef HAVE_RUNAHEAD
|
||||
/* If 'runahead_available' is false, then
|
||||
* runahead is enabled by the user but an
|
||||
* error occurred while the core was running
|
||||
* (typically a save state issue). In this
|
||||
* case we have to 'manually' reset the runahead
|
||||
* runtime variables, otherwise runahead will
|
||||
* remain disabled until the user restarts
|
||||
* RetroArch */
|
||||
if (!p_rarch->runahead_available)
|
||||
runahead_clear_variables(p_rarch);
|
||||
#endif
|
||||
|
||||
if (hwr)
|
||||
memset(hwr, 0, sizeof(*hwr));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user