From b02fba9d28ee22fb0c8a2d9aa6488c7319b5c401 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Mon, 3 Aug 2020 15:44:05 -0700 Subject: [PATCH] GBA Memory: Fix instability on Wii when using AGBPrint --- CHANGES | 1 + src/gba/gba.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGES b/CHANGES index f9aad2661..16e79309d 100644 --- a/CHANGES +++ b/CHANGES @@ -46,6 +46,7 @@ Other fixes: - FFmpeg: Fix encoding of time base - GB Core: Fix extracting SRAM when none is present - GBA: Fix leak if attempting to load BIOS multiple times + - GBA Memory: Fix instability on Wii when using AGBPrint - GBA Savedata: Fix extracting save when not yet configured in-game - Qt: Force OpenGL paint engine creation thread (fixes mgba.io/i/1642) - Qt: Fix static compilation in MinGW (fixes mgba.io/i/1769) diff --git a/src/gba/gba.c b/src/gba/gba.c index 14573c556..c1f87d2e5 100644 --- a/src/gba/gba.c +++ b/src/gba/gba.c @@ -130,7 +130,9 @@ void GBAUnloadROM(struct GBA* gba) { if (gba->yankedRomSize) { gba->yankedRomSize = 0; } +#if !defined(FIXED_ROM_BUFFER) && !defined(__wii__) mappedMemoryFree(gba->memory.rom, SIZE_CART0); +#endif } if (gba->romVf) {