mirror of
https://github.com/glfw/glfw.git
synced 2026-09-23 09:08:58 +00:00
Cocoa: Fix call to NSWindow from non-main threads
glfwSwapBuffers may be called by any thread but NSWindow may not. Bug introduced byc3ca88055fand reported by @crujose. (cherry picked from commit949275bbed)
This commit is contained in:
committed by
Camilla Löwy
parent
404c28df3d
commit
6e01359e36
+1
-1
@@ -51,7 +51,7 @@ static void swapBuffersNSGL(_GLFWwindow* window)
|
||||
|
||||
// HACK: Simulate vsync with usleep as NSGL swap interval does not apply to
|
||||
// windows with a non-visible occlusion state
|
||||
if (!([window->ns.object occlusionState] & NSWindowOcclusionStateVisible))
|
||||
if (window->ns.occluded)
|
||||
{
|
||||
int interval = 0;
|
||||
[window->context.nsgl.object getValues:&interval
|
||||
|
||||
Reference in New Issue
Block a user