Prevent divide by zero. Would sometimes result in fSkipFrames being PositiveInfinity, which gets propagated to fSkipFramesError, resulting in the "while (fSkipFramesError <= -1.0f..." loop freezing.
This commit is contained in:
parent
cabf27f5d9
commit
c971fba7df
|
@ -245,7 +245,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
endticks = GetCurTime();
|
||||
|
||||
// calculate time since last frame
|
||||
ulong diffticks = endticks - beginticks;
|
||||
ulong diffticks = Math.Max(endticks - beginticks, 1);
|
||||
float diff = (float)diffticks / afsfreq;
|
||||
|
||||
// calculate time since last frame not including throttle sleep time
|
||||
|
|
Loading…
Reference in New Issue