make sure we have more than one CPUs before enabling multi-threaded OpenGL

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1139 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
sezero 2014-11-03 09:20:23 +00:00
parent 5041fa268e
commit d4bc9c723a
1 changed files with 3 additions and 2 deletions

View File

@ -1050,8 +1050,9 @@ static void GL_Init (void)
#ifdef __APPLE__
// ericw -- enable multi-threaded OpenGL, gives a decent FPS boost.
// see: https://developer.apple.com/library/mac/technotes/tn2085/_index.html
if (kCGLNoError != CGLEnable( CGLGetCurrentContext(), kCGLCEMPEngine))
// https://developer.apple.com/library/mac/technotes/tn2085/
if (host_parms->numcpus > 1 &&
kCGLNoError != CGLEnable(CGLGetCurrentContext(), kCGLCEMPEngine))
{
Con_Warning ("Couldn't enable multi-threaded OpenGL");
}