GB: Reset active region when reloading ROM

This commit is contained in:
Jeffrey Pfau 2016-10-05 00:01:53 -07:00
parent cdb93a1469
commit 67de8c7425
2 changed files with 6 additions and 0 deletions

View File

@ -35,6 +35,7 @@ Misc:
- All: Split out install locations for Libretro and OpenEmu
- Qt: Manage window sizes slightly better
- Qt: Remember scale option independent of core dimensions
- GB: Reset active region when reloading ROM
0.5.0: (2016-09-19)
Features:

View File

@ -102,6 +102,11 @@ bool GBLoadROM(struct GB* gb, struct VFile* vf) {
gb->memory.romSize = gb->pristineRomSize;
gb->romCrc32 = doCrc32(gb->memory.rom, gb->memory.romSize);
if (gb->cpu) {
struct LR35902Core* cpu = gb->cpu;
cpu->memory.setActiveRegion(cpu, cpu->pc);
}
// TODO: error check
return true;
}