mirror of https://github.com/mgba-emu/mgba.git
GBA: Fix expected entry point for multiboot ELFs (fixes #2450)
This commit is contained in:
parent
66f445cd0a
commit
a966511e1e
|
@ -582,7 +582,7 @@ bool GBAIsROM(struct VFile* vf) {
|
|||
uint32_t entry = ELFEntry(elf);
|
||||
bool isGBA = true;
|
||||
isGBA = isGBA && ELFMachine(elf) == EM_ARM;
|
||||
isGBA = isGBA && (entry == BASE_CART0 || entry == BASE_WORKING_RAM);
|
||||
isGBA = isGBA && (entry == BASE_CART0 || entry == BASE_WORKING_RAM + 0xC0);
|
||||
ELFClose(elf);
|
||||
return isGBA;
|
||||
}
|
||||
|
@ -641,7 +641,7 @@ bool GBAIsMB(struct VFile* vf) {
|
|||
#ifdef USE_ELF
|
||||
struct ELF* elf = ELFOpen(vf);
|
||||
if (elf) {
|
||||
bool isMB = ELFEntry(elf) == BASE_WORKING_RAM;
|
||||
bool isMB = ELFEntry(elf) == BASE_WORKING_RAM + 0xC0;
|
||||
ELFClose(elf);
|
||||
return isMB;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue