# HG changeset patch # User Emir Marincic # Date 1584694338 -10800 # Fri Mar 20 11:52:18 2020 +0300 # Node ID c8f27a5e868e5b577099205f92bceb9f2ae3ffb4 # Parent 784ce9766fb9b416c028507326ec264132a4a02d [NSOpenGLContext update[ is prohibited outside the main thread diff -r 784ce9766fb9 -r c8f27a5e868e src/video/cocoa/SDL_cocoaopengl.m --- a/src/video/cocoa/SDL_cocoaopengl.m Tue Mar 17 17:34:24 2020 -0400 +++ b/src/video/cocoa/SDL_cocoaopengl.m Fri Mar 20 11:52:18 2020 +0300 @@ -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]; } }