GBA: Fix loading multiboot ELF files (fixes #1949)

This commit is contained in:
Vicki Pfau 2020-11-24 01:38:41 -08:00
parent 061a176595
commit 761667a634
2 changed files with 7 additions and 1 deletions

View File

@ -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)

View File

@ -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