From 11035f5a778d92bdbbc07c1302fde03353f2b7ee 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 | 2 +- src/gba/gba.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 04b2a6958..ed69b3399 100644 --- a/CHANGES +++ b/CHANGES @@ -7,7 +7,6 @@ Emulation fixes: - GB MBC: Fix MBC1 RAM enable bit selection - GB MBC: Fix MBC2 bit selection - GB Video: Always initialize palette - - GBA BIOS: Fix reloading video registers after reset (fixes mgba.io/i/1808) - GBA Savedata: Fix potential corruption when loading a 1Mbit flash save - GBA Video: Fix invalid read in mode 4 mosaic - GBA Video: Fix color of disabled screen @@ -21,6 +20,7 @@ Other fixes: - CMake: Add missing dllexports.h file to dev installation - 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: Fix file handle leak on opening an invalid ROM - Qt: Fix Italian RTC translation (fixes mgba.io/i/1798) diff --git a/src/gba/gba.c b/src/gba/gba.c index d5608cdab..07043c8eb 100644 --- a/src/gba/gba.c +++ b/src/gba/gba.c @@ -132,7 +132,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) {