fix clock overflow

This commit is contained in:
tildearrow 2023-10-12 05:26:48 -05:00
parent 6118e75ec7
commit 40da2ecb46
2 changed files with 38 additions and 2 deletions

View file

@ -1608,7 +1608,7 @@ bool DivEngine::nextTick(bool noAccum, bool inhibitLowLat) {
}
if (totalTicks>=1000000) {
totalTicks-=1000000;
totalSeconds++;
if (totalSeconds<0x7fffffff) totalSeconds++;
cmdsPerSecond=totalCmds-lastCmds;
lastCmds=totalCmds;
}