mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-02-24 04:56:58 +00:00
[Mac] Only dispose context on UI thread
This commit is contained in:
parent
e5e9ae0929
commit
a6c4a7c9b5
|
@ -333,6 +333,9 @@ namespace OpenTK
|
|||
|
||||
Debug.Print("Disposing of Cocoa context.");
|
||||
|
||||
if (!NSApplication.IsUIThread)
|
||||
return;
|
||||
|
||||
Cocoa.SendVoid(NSOpenGLContext, Selector.Get("clearCurrentContext"));
|
||||
Cocoa.SendVoid(Handle.Handle, Selector.Get("clearDrawable"));
|
||||
Cocoa.SendVoid(Handle.Handle, Selector.Get("release"));
|
||||
|
|
Loading…
Reference in a new issue