- Run down the semaphores so they behave more like a mutex (note: mutexes/condition variables seem to be much slower).

- Fixed: vid_maxfps and cl_capfps could run into a deadlock on Linux based operating systems.

SVN r3900 (trunk)
This commit is contained in:
Braden Obrzut 2012-10-22 23:42:20 +00:00
commit 3ec5f7ed88
3 changed files with 20 additions and 13 deletions

View file

@ -190,10 +190,10 @@ 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;
@ -245,13 +245,13 @@ 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)
{
}
}
#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)