LR35902: Fix events running with the wrong cycle active

This commit is contained in:
Jeffrey Pfau 2016-09-21 14:11:24 -07:00
parent b309e9894c
commit bf9017c89b
2 changed files with 2 additions and 0 deletions

View File

@ -7,6 +7,7 @@ Bugfixes:
- Qt: Fix saving overrides
- FFmpeg: Fix encoding AAC
- GB Video: Fix video frames getting missed when LCDC is off
- LR35902: Fix events running with the wrong cycle active
Misc:
- All: Only update version info if needed
- FFmpeg: Encoding cleanup

View File

@ -141,6 +141,7 @@ void LR35902Tick(struct LR35902Core* cpu) {
if (cpu->cycles + 2 >= cpu->nextEvent) {
int32_t diff = cpu->nextEvent - cpu->cycles;
cpu->cycles = cpu->nextEvent;
cpu->executionState += diff;
cpu->irqh.processEvents(cpu);
cpu->cycles += 2 - diff;
} else {