GBA: Fix timer initialization
Jeffrey Pfau jeffrey@endrift.com
Fri, 27 Mar 2015 01:34:49 -0700
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
src/gba/gba.c
→
src/gba/gba.c
@@ -464,7 +464,7 @@ currentTimer->nextEvent = INT_MAX;
} gba->memory.io[(REG_TM0CNT_LO + (timer << 2)) >> 1] = currentTimer->reload; currentTimer->oldReload = currentTimer->reload; - currentTimer->lastEvent = 0; + currentTimer->lastEvent = gba->cpu->cycles; gba->timersEnabled |= 1 << timer; } else if (wasEnabled && !currentTimer->enable) { if (!currentTimer->countUp) {