diff --git a/CHANGES b/CHANGES index 35d1a9a91..7e7292609 100644 --- a/CHANGES +++ b/CHANGES @@ -12,6 +12,7 @@ Other fixes: - Core: Fix thread unsafety issue when dispatching code to a thread - Core: Fix loading ELF files that have unexpected empty program headers - Debugger: Close trace log when done tracing + - GBA: Fix loading multiboot ELF files (fixes mgba.io/i/1949) - Qt: Fix running proxied video if it gets pushed to the main thread - Qt: Fix game display sometimes disappearing after closing load/save state screen - Qt: Fix gamepad event dispatching (fixes mgba.io/i/1922) diff --git a/src/gba/core.c b/src/gba/core.c index 901d25111..460f431db 100644 --- a/src/gba/core.c +++ b/src/gba/core.c @@ -454,9 +454,14 @@ static bool _GBACoreLoadROM(struct mCore* core, struct VFile* vf) { #ifdef USE_ELF struct ELF* elf = ELFOpen(vf); if (elf) { - GBALoadNull(core->board); + if (ELFEntry(elf) == BASE_CART0) { + GBALoadNull(core->board); + } bool success = mCoreLoadELF(core, elf); ELFClose(elf); + if (success) { + vf->close(vf); + } return success; } #endif