mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 03:00:38 +00:00
Small change to G_FPSLimit()
git-svn-id: https://svn.eduke32.com/eduke32@6501 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
63d3f70258
commit
5df760b347
1 changed files with 3 additions and 5 deletions
|
@ -6051,7 +6051,7 @@ void G_MaybeAllocPlayer(int32_t pnum)
|
|||
int G_FPSLimit(void)
|
||||
{
|
||||
static uint64_t nextPageTicks = 0;
|
||||
static int frameWaiting = 0;
|
||||
static unsigned frameWaiting = 0;
|
||||
|
||||
if (frameWaiting)
|
||||
{
|
||||
|
@ -6061,18 +6061,16 @@ int G_FPSLimit(void)
|
|||
|
||||
uint64_t const frameTicks = getu64ticks();
|
||||
|
||||
if (r_maxfps == 0 || frameTicks >= nextPageTicks)
|
||||
if (!r_maxfps || frameTicks >= nextPageTicks)
|
||||
{
|
||||
if (frameTicks >= nextPageTicks + g_frameDelay)
|
||||
nextPageTicks = frameTicks;
|
||||
|
||||
nextPageTicks += g_frameDelay;
|
||||
frameWaiting++;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return frameWaiting;
|
||||
}
|
||||
|
||||
// TODO: reorder (net)actor_t to eliminate slop and update assertion
|
||||
|
|
Loading…
Reference in a new issue