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:58 -07:00
parent 12c6aaa213
commit 1c06cbd8d3
2 changed files with 5 additions and 0 deletions

View File

@ -1,3 +1,7 @@
0.2.1: (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

@ -433,6 +433,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) {