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:
parent
84561c952a
commit
367ffcc3af
12 changed files with 23 additions and 21 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue