mirror of https://github.com/mgba-emu/mgba.git
GB: Fix replacing the ROM crashing when accessing ROM base
This commit is contained in:
parent
179d6a7236
commit
68ef5d3a5b
1
CHANGES
1
CHANGES
|
@ -57,6 +57,7 @@ Other fixes:
|
||||||
- FFmpeg: Fix crash when encoding audio with some containers
|
- FFmpeg: Fix crash when encoding audio with some containers
|
||||||
- FFmpeg: Fix GIF recording (fixes mgba.io/i/2393)
|
- FFmpeg: Fix GIF recording (fixes mgba.io/i/2393)
|
||||||
- GB: Fix temporary saves
|
- 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)
|
- GB, GBA: Save writeback-pending masked saves on unload (fixes mgba.io/i/2396)
|
||||||
- mGUI: Fix FPS counter after closing menu
|
- mGUI: Fix FPS counter after closing menu
|
||||||
- Qt: Fix some hangs when using the debugger console
|
- Qt: Fix some hangs when using the debugger console
|
||||||
|
|
|
@ -189,6 +189,9 @@ bool GBLoadROM(struct GB* gb, struct VFile* vf) {
|
||||||
|
|
||||||
if (gb->cpu) {
|
if (gb->cpu) {
|
||||||
struct SM83Core* cpu = gb->cpu;
|
struct SM83Core* cpu = gb->cpu;
|
||||||
|
if (!gb->memory.romBase) {
|
||||||
|
GBMBCSwitchBank0(gb, 0);
|
||||||
|
}
|
||||||
cpu->memory.setActiveRegion(cpu, cpu->pc);
|
cpu->memory.setActiveRegion(cpu, cpu->pc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue