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
{
id pixelFormat;
id object;
id object;
CVDisplayLinkRef displayLink;
atomic_int swapInterval;
int swapIntervalsPassed;

View File

@ -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)