src/video/cocoa/SDL_cocoaopengl.m
changeset 8258 569354dec4e9
parent 8149 681eb46b8ac4
child 8276 9bd65b58278e
     1.1 --- a/src/video/cocoa/SDL_cocoaopengl.m	Tue Feb 25 17:42:34 2014 -0300
     1.2 +++ b/src/video/cocoa/SDL_cocoaopengl.m	Tue Feb 25 15:28:12 2014 -0800
     1.3 @@ -110,11 +110,19 @@
     1.4  
     1.5          if ([self view] != [windowdata->nswindow contentView]) {
     1.6              [self setView:[windowdata->nswindow contentView]];
     1.7 -            [self scheduleUpdate];
     1.8 +            if (self == [NSOpenGLContext currentContext]) {
     1.9 +                [self update];
    1.10 +            } else {
    1.11 +                [self scheduleUpdate];
    1.12 +            }
    1.13          }
    1.14      } else {
    1.15          [self clearDrawable];
    1.16 -        [self scheduleUpdate];
    1.17 +        if (self == [NSOpenGLContext currentContext]) {
    1.18 +            [self update];
    1.19 +        } else {
    1.20 +            [self scheduleUpdate];
    1.21 +        }
    1.22      }
    1.23  }
    1.24