GB Video: Set mode variable when disabling LCDC

This commit is contained in:
Vicki Pfau 2018-06-24 16:53:34 -07:00
parent aa0f988daa
commit 932f2624c0
1 changed files with 1 additions and 0 deletions

View File

@ -437,6 +437,7 @@ void GBVideoWriteLCDC(struct GBVideo* video, GBRegisterLCDC value) {
}
if (GBRegisterLCDCIsEnable(video->p->memory.io[REG_LCDC]) && !GBRegisterLCDCIsEnable(value)) {
// TODO: Fix serialization; this gets internal and visible modes out of sync
video->mode = 0;
video->stat = GBRegisterSTATSetMode(video->stat, 0);
video->p->memory.io[REG_STAT] = video->stat;
video->ly = 0;