From 94300014258aff039061d19bcd73a3c99d9b16c2 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Fri, 14 Nov 2008 23:16:21 +0000 Subject: [PATCH] - Added one to return value of SDL_GetTicks() to ensure non-zeroness. SVN r1288 (trunk) --- src/sdl/i_system.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sdl/i_system.cpp b/src/sdl/i_system.cpp index c79ceba39..67e57aa59 100644 --- a/src/sdl/i_system.cpp +++ b/src/sdl/i_system.cpp @@ -131,7 +131,7 @@ int I_GetTimePolled (bool saveMS) return TicFrozen; } - DWORD tm = SDL_GetTicks (); + DWORD tm = SDL_GetTicks() + 1; // Make sure this isn't 0. if (BaseTime == 0) { BaseTime = tm; @@ -140,9 +140,9 @@ int I_GetTimePolled (bool saveMS) if (saveMS) { 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)