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 7347b4f6a86e8523
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
     1.1 --- a/src/video/cocoa/SDL_cocoaopengl.m	Fri Jul 05 01:09:27 2013 -0400
     1.2 +++ b/src/video/cocoa/SDL_cocoaopengl.m	Fri Jul 05 01:18:18 2013 -0400
     1.3 @@ -223,7 +223,7 @@
     1.4              [nscontext setFullScreen];
     1.5          } else
     1.6  #endif
     1.7 -        {
     1.8 +        if ([nscontext view] != [windowdata->nswindow contentView]) {
     1.9              [nscontext setView:[windowdata->nswindow contentView]];
    1.10              [nscontext update];
    1.11          }