GBA: Fix timers not updating timing when writing to only the reload register

This commit is contained in:
Jeffrey Pfau 2015-04-03 23:51:36 -07:00
parent 67bc9e7280
commit 13a77ea3ff
2 changed files with 5 additions and 0 deletions

View File

@ -1,3 +1,7 @@
0.3.0: (Future)
Bugfixes:
- GBA: Fix timers not updating timing when writing to only the reload register
0.2.0: (2015-04-03)
Features:
- Support for gamepad axes, e.g. analog sticks or triggers

View File

@ -434,6 +434,7 @@ void GBATimerUpdateRegister(struct GBA* gba, int timer) {
void GBATimerWriteTMCNT_LO(struct GBA* gba, int timer, uint16_t reload) {
gba->timers[timer].reload = reload;
gba->timers[timer].overflowInterval = (0x10000 - gba->timers[timer].reload) << gba->timers[timer].prescaleBits;
}
void GBATimerWriteTMCNT_HI(struct GBA* gba, int timer, uint16_t control) {