diff --git a/CHANGES b/CHANGES index 1cca99040..1545fbd30 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,8 @@ Features: - New unlicensed GB mappers: NT (older types 1 and 2), Li Cheng, GGB-81 - Debugger: Add range watchpoints +Emulation fixes: + - GB Serialize: Don't write BGP/OBP when loading SCGB state (fixes mgba.io/i/2694) Other fixes: - Qt: Manually split filename to avoid overzealous splitting (fixes mgba.io/i/2681) - Qt: Expand criteria for tag branch names (fixes mgba.io/i/2679) diff --git a/src/gb/io.c b/src/gb/io.c index c6ad66c36..06a7927cd 100644 --- a/src/gb/io.c +++ b/src/gb/io.c @@ -754,7 +754,7 @@ void GBIODeserialize(struct GB* gb, const struct GBSerializedState* state) { gb->video.renderer->writeVideoRegister(gb->video.renderer, GB_REG_SCX, state->io[GB_REG_SCX]); gb->video.renderer->writeVideoRegister(gb->video.renderer, GB_REG_WY, state->io[GB_REG_WY]); gb->video.renderer->writeVideoRegister(gb->video.renderer, GB_REG_WX, state->io[GB_REG_WX]); - if (gb->model & GB_MODEL_SGB) { + if (gb->model == GB_MODEL_SGB) { gb->video.renderer->writeVideoRegister(gb->video.renderer, GB_REG_BGP, state->io[GB_REG_BGP]); gb->video.renderer->writeVideoRegister(gb->video.renderer, GB_REG_OBP0, state->io[GB_REG_OBP0]); gb->video.renderer->writeVideoRegister(gb->video.renderer, GB_REG_OBP1, state->io[GB_REG_OBP1]);