mirror of https://github.com/mgba-emu/mgba.git
GBA: Fix timer initialization
This commit is contained in:
parent
4b957cb66d
commit
811ada598e
|
@ -464,7 +464,7 @@ void GBATimerWriteTMCNT_HI(struct GBA* gba, int timer, uint16_t control) {
|
||||||
}
|
}
|
||||||
gba->memory.io[(REG_TM0CNT_LO + (timer << 2)) >> 1] = currentTimer->reload;
|
gba->memory.io[(REG_TM0CNT_LO + (timer << 2)) >> 1] = currentTimer->reload;
|
||||||
currentTimer->oldReload = currentTimer->reload;
|
currentTimer->oldReload = currentTimer->reload;
|
||||||
currentTimer->lastEvent = 0;
|
currentTimer->lastEvent = gba->cpu->cycles;
|
||||||
gba->timersEnabled |= 1 << timer;
|
gba->timersEnabled |= 1 << timer;
|
||||||
} else if (wasEnabled && !currentTimer->enable) {
|
} else if (wasEnabled && !currentTimer->enable) {
|
||||||
if (!currentTimer->countUp) {
|
if (!currentTimer->countUp) {
|
||||||
|
|
Loading…
Reference in New Issue