mirror of
https://github.com/libretro/RetroArch
synced 2025-03-25 16:44:01 +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
|
else
|
||||||
input_remapping_restore_global_config(true);
|
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 */
|
/* Attempt initializing dummy core */
|
||||||
runloop_st->current_core_type = CORE_TYPE_DUMMY;
|
runloop_st->current_core_type = CORE_TYPE_DUMMY;
|
||||||
if (!command_event(CMD_EVENT_CORE_INIT, &runloop_st->current_core_type))
|
if (!command_event(CMD_EVENT_CORE_INIT, &runloop_st->current_core_type))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user