- OK, so we can't have vid_maxfps on OS X since there does not appear to be an equivalent to POSIX timers. The only thing I could find would require Objective-C and an event loop.

SVN r3892 (trunk)
This commit is contained in:
Braden Obrzut 2012-10-18 00:57:56 +00:00
commit df5d43badf
3 changed files with 16 additions and 6 deletions

View file

@ -190,10 +190,11 @@ void I_ClosestResolution (int *width, int *height, int bits)
// Pass a negative value for the limit to use the value of vid_maxfps.
//
//==========================================================================
EXTERN_CVAR(Int, vid_maxfps);
EXTERN_CVAR(Bool, cl_capfps);
#ifndef __APPLE__
Semaphore FPSLimitSemaphore;
static void FPSLimitNotify(sigval val)
@ -244,7 +245,14 @@ void I_SetFPSLimit(int limit)
Printf("Failed to set FPS limitter timer\n");
DPrintf("FPS timer set to %u ms\n", (unsigned int) period.it_interval.tv_nsec / 1000000);
}
}
}
#else
// So Apple doesn't support POSIX timers and I can't find a good substitute short of
// having Objective-C Cocoa events or something like that.
void I_SetFPSLimit(int limit)
{
}
#endif
CUSTOM_CVAR (Int, vid_maxfps, 200, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
{