mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-26 12:18:51 -05:00
parent
82ca58da04
commit
3615d437a7
|
@ -37,7 +37,7 @@
|
|||
typedef struct _GLFWcontextNSGL
|
||||
{
|
||||
id pixelFormat;
|
||||
id object;
|
||||
id object;
|
||||
CVDisplayLinkRef displayLink;
|
||||
atomic_int swapInterval;
|
||||
int swapIntervalsPassed;
|
||||
|
|
|
@ -38,18 +38,18 @@ static CVReturn displayLinkCallback(CVDisplayLinkRef displayLink,
|
|||
CVOptionFlags* flagsOut,
|
||||
void* userInfo)
|
||||
{
|
||||
_GLFWwindow* window = (_GLFWwindow *) userInfo;
|
||||
_GLFWwindow* window = (_GLFWwindow *) userInfo;
|
||||
|
||||
const int setting = atomic_load(&window->context.nsgl.swapInterval);
|
||||
if (setting > 0)
|
||||
{
|
||||
[window->context.nsgl.swapIntervalCond lock];
|
||||
window->context.nsgl.swapIntervalsPassed++;
|
||||
[window->context.nsgl.swapIntervalCond signal];
|
||||
[window->context.nsgl.swapIntervalCond unlock];
|
||||
}
|
||||
const int setting = atomic_load(&window->context.nsgl.swapInterval);
|
||||
if (setting > 0)
|
||||
{
|
||||
[window->context.nsgl.swapIntervalCond lock];
|
||||
window->context.nsgl.swapIntervalsPassed++;
|
||||
[window->context.nsgl.swapIntervalCond signal];
|
||||
[window->context.nsgl.swapIntervalCond unlock];
|
||||
}
|
||||
|
||||
return kCVReturnSuccess;
|
||||
return kCVReturnSuccess;
|
||||
}
|
||||
|
||||
static void makeContextCurrentNSGL(_GLFWwindow* window)
|
||||
|
|
Loading…
Reference in New Issue
Block a user