mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 08:30:16 +00:00
Merge pull request #12104 from Jamiras/cheevos/rewind_threaded
(cheevos) ensure rewind is only initialized/deinitialized on main thread
This commit is contained in:
commit
07146047f9
@ -1584,7 +1584,14 @@ static void rcheevos_toggle_hardcore_active(rcheevos_locals_t* locals)
|
||||
|
||||
/* deinit rewind */
|
||||
if (rewind_enable)
|
||||
{
|
||||
#ifdef HAVE_THREADS
|
||||
/* have to "schedule" this. CMD_EVENT_REWIND_DEINIT should only be called on the main thread */
|
||||
rcheevos_locals.queued_command = CMD_EVENT_REWIND_DEINIT;
|
||||
#else
|
||||
command_event(CMD_EVENT_REWIND_DEINIT, NULL);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1601,7 +1608,14 @@ static void rcheevos_toggle_hardcore_active(rcheevos_locals_t* locals)
|
||||
|
||||
/* re-init rewind */
|
||||
if (rewind_enable)
|
||||
{
|
||||
#ifdef HAVE_THREADS
|
||||
/* have to "schedule" this. CMD_EVENT_REWIND_INIT should only be called on the main thread */
|
||||
rcheevos_locals.queued_command = CMD_EVENT_REWIND_INIT;
|
||||
#else
|
||||
command_event(CMD_EVENT_REWIND_INIT, NULL);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
if (locals->loaded)
|
||||
|
Loading…
Reference in New Issue
Block a user