Reset timers when enabling them (fixes #78)
Jeffrey Pfau jeffrey@endrift.com
Wed, 02 Jul 2014 00:48:20 -0700
1 files changed,
1 insertions(+),
0 deletions(-)
jump to
M
src/gba/gba.c
→
src/gba/gba.c
@@ -434,6 +434,7 @@ currentTimer->nextEvent = INT_MAX;
} gba->memory.io[(REG_TM0CNT_LO + (timer << 2)) >> 1] = currentTimer->reload; currentTimer->oldReload = currentTimer->reload; + currentTimer->lastEvent = 0; gba->timersEnabled |= 1 << timer; } else if (wasEnabled && !currentTimer->enable) { if (!currentTimer->countUp) {