mirror of https://github.com/mgba-emu/mgba.git
GB Video: Fix event timing on LCD enable
This commit is contained in:
parent
e019c54aad
commit
76c41a62ba
|
@ -140,8 +140,8 @@ void GBVideoWriteLCDC(struct GBVideo* video, GBRegisterLCDC value) {
|
|||
video->stat = GBRegisterSTATSetMode(video->stat, video->mode);
|
||||
video->p->memory.io[REG_STAT] = video->stat;
|
||||
video->eventDiff = 0;
|
||||
if (video->nextEvent < video->p->cpu->nextEvent) {
|
||||
video->p->cpu->nextEvent = video->nextEvent;
|
||||
if (video->p->cpu->cycles + video->nextEvent < video->p->cpu->nextEvent) {
|
||||
video->p->cpu->nextEvent = video->p->cpu->cycles + video->nextEvent;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue