Don't set the same GL context twice on Mac OS X (thanks, Alex!).
authorRyan C. Gordon <icculus@icculus.org>
Fri, 05 Jul 2013 01:18:18 -0400
changeset 7347 b4f6a86e8523
parent 7346 ff228f955a48
child 7348 50b6e7a26ba3
Don't set the same GL context twice on Mac OS X (thanks, Alex!). Fixes Bugzilla #1939.
src/video/cocoa/SDL_cocoaopengl.m
--- a/src/video/cocoa/SDL_cocoaopengl.m	Fri Jul 05 01:09:27 2013 -0400
+++ b/src/video/cocoa/SDL_cocoaopengl.m	Fri Jul 05 01:18:18 2013 -0400
@@ -223,7 +223,7 @@
             [nscontext setFullScreen];
         } else
 #endif
-        {
+        if ([nscontext view] != [windowdata->nswindow contentView]) {
             [nscontext setView:[windowdata->nswindow contentView]];
             [nscontext update];
         }