Added a macro SDL_TICKS_PASSED() to correctly compare two 32-bit tick values.

Went through the code and used the macro and fixed a couple places that were using incorrect timestamp comparisons.
This commit is contained in:
Sam Lantinga 2013-10-20 20:42:55 -07:00
parent 84561c952a
commit 367ffcc3af
12 changed files with 23 additions and 21 deletions

View file

@ -133,9 +133,7 @@ PAUDIO_WaitDevice(_THIS)
/* Use timer for general audio synchronization */
Sint32 ticks;
ticks =
((Sint32) (this->hidden->next_frame - SDL_GetTicks())) -
FUDGE_TICKS;
ticks = ((Sint32) (this->hidden->next_frame - SDL_GetTicks())) - FUDGE_TICKS;
if (ticks > 0) {
SDL_Delay(ticks);
}