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:
J.D. Purcell 2016-12-15 22:10:38 -05:00
parent cabf27f5d9
commit c971fba7df
1 changed files with 1 additions and 1 deletions

View File

@ -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