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

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1139 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Ozkan Sezer 2014-11-03 09:20:23 +00:00
parent a4b30a4eed
commit 6b57f04f57

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");
}