X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=frontend%2Flibretro.c;h=783f9cd2ee0ce40d6de828343ee6d12cf23cc80c;hb=570b9365c21d4e30a09b5e55c7cc94954fd4dd6d;hp=6872ddeff3eccc13235abc3784231a30f7dfa6bb;hpb=44747c73cf572febe81ff687c81548ce5b5de493;p=pcsx_rearmed.git diff --git a/frontend/libretro.c b/frontend/libretro.c index 6872ddef..783f9cd2 100644 --- a/frontend/libretro.c +++ b/frontend/libretro.c @@ -1227,6 +1227,7 @@ static void set_retro_memmap(void) environ_cb(RETRO_ENVIRONMENT_SET_MEMORY_MAPS, &retromap); } +static void update_variables(bool in_flight); bool retro_load_game(const struct retro_game_info *info) { size_t i; @@ -1422,6 +1423,8 @@ bool retro_load_game(const struct retro_game_info *info) return false; } + update_variables(false); + if (plugins_opened) { ClosePlugins(); plugins_opened = 0; @@ -1772,7 +1775,7 @@ static void update_variables(bool in_flight) if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value) { - R3000Acpu *prev_cpu = psxCpu; + R3000Acpu *prev_cpu = psxCpu; #if defined(LIGHTREC) bool can_use_dynarec = found_bios; #else @@ -2762,13 +2765,15 @@ void retro_init(void) if (environ_cb(RETRO_ENVIRONMENT_GET_INPUT_BITMASKS, NULL)) libretro_supports_bitmasks = true; - update_variables(false); check_system_specs(); } void retro_deinit(void) { - ClosePlugins(); + if (plugins_opened) { + ClosePlugins(); + plugins_opened = 0; + } SysClose(); #ifdef _3DS linearFree(vout_buf);