mirror of
https://github.com/libretro/RetroArch
synced 2025-03-20 01:21:03 +00:00
Ensure that cores are deinitialised correctly following initialisation failure (#13665)
This commit is contained in:
parent
f0d9add1b2
commit
b697f556e5
@ -5364,6 +5364,12 @@ bool retroarch_main_init(int argc, char *argv[])
|
||||
else
|
||||
input_remapping_restore_global_config(true);
|
||||
|
||||
#ifdef HAVE_DYNAMIC
|
||||
/* Ensure that currently loaded core is properly
|
||||
* deinitialised */
|
||||
if (runloop_st->current_core_type != CORE_TYPE_DUMMY)
|
||||
command_event(CMD_EVENT_CORE_DEINIT, NULL);
|
||||
#endif
|
||||
/* Attempt initializing dummy core */
|
||||
runloop_st->current_core_type = CORE_TYPE_DUMMY;
|
||||
if (!command_event(CMD_EVENT_CORE_INIT, &runloop_st->current_core_type))
|
||||
|
Loading…
x
Reference in New Issue
Block a user