GB Video: Fix mode end events when turning off LCD

This commit is contained in:
Jeffrey Pfau 2017-01-11 01:46:49 -08:00
parent 0b6bc9ae82
commit 62718fce45
1 changed files with 1 additions and 0 deletions

View File

@ -321,6 +321,7 @@ void GBVideoWriteLCDC(struct GBVideo* video, GBRegisterLCDC value) {
video->p->memory.io[REG_STAT] = video->stat;
video->ly = 0;
video->p->memory.io[REG_LY] = 0;
mTimingDeschedule(&video->p->timing, &video->modeEvent);
mTimingSchedule(&video->p->timing, &video->frameEvent, GB_VIDEO_TOTAL_LENGTH);
}
video->p->memory.io[REG_STAT] = video->stat;