Permalink
Browse files

GB Video: Set mode variable when disabling LCDC

  • Loading branch information...
endrift committed Jun 24, 2018
1 parent aa0f988 commit 932f2624c07c90a9a0d3b0bd6893e801a7962d47
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/gb/video.c
View
@@ -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;

0 comments on commit 932f262

Please sign in to comment.