[NSOpenGLContext update[ is prohibited outside the main thread
authorEmir Marincic <learath2@gmail.com>
Fri, 20 Mar 2020 11:52:18 +0300
changeset 13647c8f27a5e868e
parent 13646 784ce9766fb9
child 13648 1631ba283bc4
[NSOpenGLContext update[ is prohibited outside the main thread
src/video/cocoa/SDL_cocoaopengl.m
     1.1 --- a/src/video/cocoa/SDL_cocoaopengl.m	Tue Mar 17 17:34:24 2020 -0400
     1.2 +++ b/src/video/cocoa/SDL_cocoaopengl.m	Fri Mar 20 11:52:18 2020 +0300
     1.3 @@ -66,7 +66,7 @@
     1.4      int value = SDL_AtomicSet(&self->dirty, 0);
     1.5      if (value > 0) {
     1.6          /* We call the real underlying update here, since -[SDLOpenGLContext update] just calls us. */
     1.7 -        [super update];
     1.8 +        [super performSelectorOnMainThread:@selector(update) withObject:nil waitUntilDone:NO];
     1.9      }
    1.10  }
    1.11