Просмотр исходного кода

[NSOpenGLContext update[ is prohibited outside the main thread

Emir Marincic 6 лет назад
Родитель
Сommit
5b3b55a181
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/video/cocoa/SDL_cocoaopengl.m

+ 1 - 1
src/video/cocoa/SDL_cocoaopengl.m

@@ -66,7 +66,7 @@
     int value = SDL_AtomicSet(&self->dirty, 0);
     if (value > 0) {
         /* We call the real underlying update here, since -[SDLOpenGLContext update] just calls us. */
-        [super update];
+        [super performSelectorOnMainThread:@selector(update) withObject:nil waitUntilDone:NO];
     }
 }