GB: Fix replacing the ROM crashing when accessing ROM base

This commit is contained in:
Vicki Pfau 2022-06-30 04:20:30 -07:00
parent 179d6a7236
commit 68ef5d3a5b
2 changed files with 4 additions and 0 deletions

View File

@ -57,6 +57,7 @@ Other fixes:
- FFmpeg: Fix crash when encoding audio with some containers
- FFmpeg: Fix GIF recording (fixes mgba.io/i/2393)
- GB: Fix temporary saves
- GB: Fix replacing the ROM crashing when accessing ROM base
- GB, GBA: Save writeback-pending masked saves on unload (fixes mgba.io/i/2396)
- mGUI: Fix FPS counter after closing menu
- Qt: Fix some hangs when using the debugger console

View File

@ -189,6 +189,9 @@ bool GBLoadROM(struct GB* gb, struct VFile* vf) {
if (gb->cpu) {
struct SM83Core* cpu = gb->cpu;
if (!gb->memory.romBase) {
GBMBCSwitchBank0(gb, 0);
}
cpu->memory.setActiveRegion(cpu, cpu->pc);
}