GB: Fix crash when changing ROM while in banked address space

This commit is contained in:
Vicki Pfau 2021-02-24 01:34:55 -08:00
parent 67475a6da8
commit 938f2a4924
2 changed files with 2 additions and 0 deletions

View File

@ -75,6 +75,7 @@ Other fixes:
- Debugger: Fix change watchpoints (fixes mgba.io/i/1947)
- FFmpeg: Fix some small memory leaks
- FFmpeg: Fix encoding of time base
- GB: Fix crash when changing ROM while in banked address space
- GB Video: Fix SGB video logs
- GBA: Fix loading multiboot ELF files (fixes mgba.io/i/1949)
- mGUI: Don't attempt to preload files larger than can fit in RAM

View File

@ -119,6 +119,7 @@ bool GBLoadROM(struct GB* gb, struct VFile* vf) {
GBMBCInit(gb);
if (gb->cpu) {
GBMBCSwitchBank(gb, 0);
struct SM83Core* cpu = gb->cpu;
cpu->memory.setActiveRegion(cpu, cpu->pc);
}