Commit d0e8d06d authored by Camilla Löwy's avatar Camilla Löwy
Browse files

Cleanup

Related to #1417.
parent 3615d437
......@@ -40,8 +40,8 @@ static CVReturn displayLinkCallback(CVDisplayLinkRef displayLink,
{
_GLFWwindow* window = (_GLFWwindow *) userInfo;
const int setting = atomic_load(&window->context.nsgl.swapInterval);
if (setting > 0)
const int interval = atomic_load(&window->context.nsgl.swapInterval);
if (interval > 0)
{
[window->context.nsgl.swapIntervalCond lock];
window->context.nsgl.swapIntervalsPassed++;
......@@ -70,14 +70,14 @@ static void swapBuffersNSGL(_GLFWwindow* window)
{
@autoreleasepool {
const int setting = atomic_load(&window->context.nsgl.swapInterval);
if (setting > 0)
const int interval = atomic_load(&window->context.nsgl.swapInterval);
if (interval > 0)
{
[window->context.nsgl.swapIntervalCond lock];
do
{
[window->context.nsgl.swapIntervalCond wait];
} while (window->context.nsgl.swapIntervalsPassed % setting != 0);
} while (window->context.nsgl.swapIntervalsPassed % interval != 0);
window->context.nsgl.swapIntervalsPassed = 0;
[window->context.nsgl.swapIntervalCond unlock];
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment