Attempt to fix frame timer on broken mainboards

This commit is contained in:
Siana Gearz
2012-11-13 02:50:15 +01:00
parent f4016c2e1c
commit 5eb99b7d2f

View File

@@ -262,6 +262,11 @@ U64 totalTime()
// No wrapping, we're all okay.
gTotalTimeClockCount += current_clock_count - gLastTotalTimeClockCount;
}
else if((gLastTotalTimeClockCount - current_clock_count)<0xFFFF)
{
//clock is glitching and walking backwards - ignore it
gTotalTimeClockCount = gLastTotalTimeClockCount;
}
else
{
// We've wrapped. Compensate correctly