mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-01-18 06:31:45 +00:00
- Added one to return value of SDL_GetTicks() to ensure non-zeroness.
SVN r1288 (trunk)
This commit is contained in:
parent
183b765cf2
commit
9430001425
1 changed files with 3 additions and 3 deletions
|
@ -131,7 +131,7 @@ int I_GetTimePolled (bool saveMS)
|
||||||
return TicFrozen;
|
return TicFrozen;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD tm = SDL_GetTicks ();
|
DWORD tm = SDL_GetTicks() + 1; // Make sure this isn't 0.
|
||||||
if (BaseTime == 0)
|
if (BaseTime == 0)
|
||||||
{
|
{
|
||||||
BaseTime = tm;
|
BaseTime = tm;
|
||||||
|
@ -140,9 +140,9 @@ int I_GetTimePolled (bool saveMS)
|
||||||
if (saveMS)
|
if (saveMS)
|
||||||
{
|
{
|
||||||
TicStart = tm;
|
TicStart = tm;
|
||||||
TicNext = Scale ((Scale (tm, TICRATE, 1000) + 1), 1000, TICRATE);
|
TicNext = Scale((Scale (tm, TICRATE, 1000) + 1), 1000, TICRATE);
|
||||||
}
|
}
|
||||||
return Scale (tm - BaseTime, TICRATE, 1000);
|
return Scale(tm - BaseTime, TICRATE, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
int I_WaitForTicPolled (int prevtic)
|
int I_WaitForTicPolled (int prevtic)
|
||||||
|
|
Loading…
Reference in a new issue