Formatting

Related to #1417.
This commit is contained in:
Camilla Löwy 2019-02-13 02:16:09 +01:00
parent 82ca58da04
commit 3615d437a7
2 changed files with 11 additions and 11 deletions

View File

@ -37,7 +37,7 @@
typedef struct _GLFWcontextNSGL typedef struct _GLFWcontextNSGL
{ {
id pixelFormat; id pixelFormat;
id object; id object;
CVDisplayLinkRef displayLink; CVDisplayLinkRef displayLink;
atomic_int swapInterval; atomic_int swapInterval;
int swapIntervalsPassed; int swapIntervalsPassed;

View File

@ -38,18 +38,18 @@ static CVReturn displayLinkCallback(CVDisplayLinkRef displayLink,
CVOptionFlags* flagsOut, CVOptionFlags* flagsOut,
void* userInfo) void* userInfo)
{ {
_GLFWwindow* window = (_GLFWwindow *) userInfo; _GLFWwindow* window = (_GLFWwindow *) userInfo;
const int setting = atomic_load(&window->context.nsgl.swapInterval); const int setting = atomic_load(&window->context.nsgl.swapInterval);
if (setting > 0) if (setting > 0)
{ {
[window->context.nsgl.swapIntervalCond lock]; [window->context.nsgl.swapIntervalCond lock];
window->context.nsgl.swapIntervalsPassed++; window->context.nsgl.swapIntervalsPassed++;
[window->context.nsgl.swapIntervalCond signal]; [window->context.nsgl.swapIntervalCond signal];
[window->context.nsgl.swapIntervalCond unlock]; [window->context.nsgl.swapIntervalCond unlock];
} }
return kCVReturnSuccess; return kCVReturnSuccess;
} }
static void makeContextCurrentNSGL(_GLFWwindow* window) static void makeContextCurrentNSGL(_GLFWwindow* window)