mirror of https://github.com/mgba-emu/mgba.git
GBA Core: Fix core reset without ROM
This commit is contained in:
parent
9caa6f19ed
commit
525354e500
|
@ -209,9 +209,11 @@ static void _GBACoreReset(struct mCore* core) {
|
||||||
|
|
||||||
struct GBACartridgeOverride override;
|
struct GBACartridgeOverride override;
|
||||||
const struct GBACartridge* cart = (const struct GBACartridge*) gba->memory.rom;
|
const struct GBACartridge* cart = (const struct GBACartridge*) gba->memory.rom;
|
||||||
memcpy(override.id, &cart->id, sizeof(override.id));
|
if (cart) {
|
||||||
if (GBAOverrideFind(gbacore->overrides, &override)) {
|
memcpy(override.id, &cart->id, sizeof(override.id));
|
||||||
GBAOverrideApply(gba, &override);
|
if (GBAOverrideFind(gbacore->overrides, &override)) {
|
||||||
|
GBAOverrideApply(gba, &override);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue