Merge pull request #314 from libretro/potential-fix-bizhawk

Potential fix for non-RetroArch libretro frontends
This commit is contained in:
LibretroAdmin 2022-12-14 23:21:01 +01:00 committed by GitHub
commit 0fb884837a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3185,6 +3185,7 @@ bool retro_load_game(const struct retro_game_info *info)
content_path[0] = '\0';
content_ext[0] = '\0';
system_hw = 0;
g_rom_data = NULL;
g_rom_size = 0;
@ -3449,11 +3450,13 @@ bool retro_load_game(const struct retro_game_info *info)
error:
if (sms_ntsc)
free(sms_ntsc);
sms_ntsc = NULL;
sms_ntsc = NULL;
if (md_ntsc)
free(md_ntsc);
md_ntsc = NULL;
md_ntsc = NULL;
system_hw = 0;
return false;
}
@ -3488,11 +3491,12 @@ void retro_unload_game(void)
if (md_ntsc)
free(md_ntsc);
md_ntsc = NULL;
md_ntsc = NULL;
if (sms_ntsc)
free(sms_ntsc);
sms_ntsc = NULL;
sms_ntsc = NULL;
system_hw = 0;
}
unsigned retro_get_region(void) { return vdp_pal ? RETRO_REGION_PAL : RETRO_REGION_NTSC; }