diff --git a/command.c b/command.c index a76eaacc73..35419f952c 100644 --- a/command.c +++ b/command.c @@ -1161,6 +1161,7 @@ static void command_event_deinit_core(bool reinit) core_unload_game(); core_unload(); + core_uninit_symbols(); if (reinit) { diff --git a/core.h b/core.h index 87cdf282e5..1ea430aa8c 100644 --- a/core.h +++ b/core.h @@ -180,6 +180,8 @@ void core_unset_input_descriptors(void); bool core_uninit_libretro_callbacks(void); +void core_uninit_symbols(void); + void core_set_input_state(retro_ctx_input_state_info_t *info); RETRO_END_DECLS diff --git a/core_impl.c b/core_impl.c index 07cf7a99d0..4ad1881f06 100644 --- a/core_impl.c +++ b/core_impl.c @@ -211,6 +211,11 @@ bool core_set_poll_type(unsigned *type) return true; } +void core_uninit_symbols(void) +{ + uninit_libretro_sym(&core); +} + bool core_init_symbols(enum rarch_core_type *type) { if (!type) @@ -329,10 +334,10 @@ bool core_init(void) bool core_unload(void) { core.retro_deinit(); - uninit_libretro_sym(&core); return true; } + bool core_unload_game(void) { video_driver_deinit_hw_context();