Rev 9097 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9097 | Rev 9790 | ||
---|---|---|---|
Line 404... | Line 404... | ||
404 | // get timing info for last frame |
404 | // get timing info for last frame |
405 | // |
405 | // |
406 | if (demoplayback || demorecord) // demo recording and playback needs to be constant |
406 | if (demoplayback || demorecord) // demo recording and playback needs to be constant |
407 | { |
407 | { |
408 | // wait up to DEMOTICS Wolf tics |
408 | // wait up to DEMOTICS Wolf tics |
409 | uint32_t curtime = uSDL_GetTicks(); |
409 | uint32_t curtime = SDL_GetTicks(); |
410 | lasttimecount += DEMOTICS; |
410 | lasttimecount += DEMOTICS; |
411 | int32_t timediff = (lasttimecount * 100) / 7 - curtime; |
411 | int32_t timediff = (lasttimecount * 100) / 7 - curtime; |
412 | if(timediff > 0) |
412 | if(timediff > 0) |
413 | uSDL_Delay(timediff); |
413 | SDL_Delay(timediff); |
Line 414... | Line 414... | ||
414 | 414 | ||
415 | if(timediff < -2 * DEMOTICS) // more than 2-times DEMOTICS behind? |
415 | if(timediff < -2 * DEMOTICS) // more than 2-times DEMOTICS behind? |
Line 416... | Line 416... | ||
416 | lasttimecount = (curtime * 7) / 100; // yes, set to current timecount |
416 | lasttimecount = (curtime * 7) / 100; // yes, set to current timecount |