From d4bc9c723a2183aa6d544af3d96bbbefd01a1ec1 Mon Sep 17 00:00:00 2001 From: sezero Date: Mon, 3 Nov 2014 09:20:23 +0000 Subject: [PATCH] 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 --- quakespasm/Quake/gl_vidsdl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/quakespasm/Quake/gl_vidsdl.c b/quakespasm/Quake/gl_vidsdl.c index 6f600f97..64ae3792 100644 --- a/quakespasm/Quake/gl_vidsdl.c +++ b/quakespasm/Quake/gl_vidsdl.c @@ -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"); }