GBA Timer: Fix count-up timing overflowing timer 3

This commit is contained in:
Vicki Pfau 2017-07-09 11:07:22 -07:00
parent 584d374433
commit a9d370da0b
2 changed files with 2 additions and 1 deletions

View File

@ -169,6 +169,7 @@ Bugfixes:
- GB Serialize: Fix timer serialization - GB Serialize: Fix timer serialization
- GB Audio: Fix incorrect channel 4 iteration - GB Audio: Fix incorrect channel 4 iteration
- GB Audio: Fix zombie mode bit masking - GB Audio: Fix zombie mode bit masking
- GBA Timer: Fix count-up timing overflowing timer 3
Misc: Misc:
- Qt: Add language selector - Qt: Add language selector
- GBA Timer: Improve accuracy of timers - GBA Timer: Improve accuracy of timers

View File

@ -28,7 +28,7 @@ static void GBATimerUpdate(struct mTiming* timing, struct GBA* gba, int timerId,
} }
} }
if (timerId < 4) { if (timerId < 3) {
struct GBATimer* nextTimer = &gba->timers[timerId + 1]; struct GBATimer* nextTimer = &gba->timers[timerId + 1];
if (GBATimerFlagsIsCountUp(nextTimer->flags)) { // TODO: Does this increment while disabled? if (GBATimerFlagsIsCountUp(nextTimer->flags)) { // TODO: Does this increment while disabled?
++gba->memory.io[(REG_TM1CNT_LO >> 1) + (timerId << 1)]; ++gba->memory.io[(REG_TM1CNT_LO >> 1) + (timerId << 1)];