mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-07 19:10:36 +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.");
|
Debug.Print("Disposing of Cocoa context.");
|
||||||
|
|
||||||
|
if (!NSApplication.IsUIThread)
|
||||||
|
return;
|
||||||
|
|
||||||
Cocoa.SendVoid(NSOpenGLContext, Selector.Get("clearCurrentContext"));
|
Cocoa.SendVoid(NSOpenGLContext, Selector.Get("clearCurrentContext"));
|
||||||
Cocoa.SendVoid(Handle.Handle, Selector.Get("clearDrawable"));
|
Cocoa.SendVoid(Handle.Handle, Selector.Get("clearDrawable"));
|
||||||
Cocoa.SendVoid(Handle.Handle, Selector.Get("release"));
|
Cocoa.SendVoid(Handle.Handle, Selector.Get("release"));
|
||||||
|
|
Loading…
Reference in a new issue