diff --git a/glfw/cocoa_monitor.m b/glfw/cocoa_monitor.m index 95d75d3bc..50dd535b8 100644 --- a/glfw/cocoa_monitor.m +++ b/glfw/cocoa_monitor.m @@ -354,8 +354,9 @@ void _glfwPollMonitorsNS(void) void _glfwSetVideoModeNS(_GLFWmonitor* monitor, const GLFWvidmode* desired) { GLFWvidmode current; - const GLFWvidmode* best = _glfwChooseVideoMode(monitor, desired); _glfwPlatformGetVideoMode(monitor, ¤t); + + const GLFWvidmode* best = _glfwChooseVideoMode(monitor, desired); if (_glfwCompareVideoModes(¤t, best) == 0) return; @@ -505,7 +506,6 @@ GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* count) void _glfwPlatformGetVideoMode(_GLFWmonitor* monitor, GLFWvidmode *mode) { CVDisplayLinkRef link; - CVDisplayLinkCreateWithCGDisplay(monitor->ns.displayID, &link); CGDisplayModeRef native = CGDisplayCopyDisplayMode(monitor->ns.displayID); diff --git a/glfw/cocoa_window.m b/glfw/cocoa_window.m index 6288c71ce..22045bb36 100644 --- a/glfw/cocoa_window.m +++ b/glfw/cocoa_window.m @@ -647,9 +647,9 @@ static const NSRange kEmptyRange = { NSNotFound, 0 }; } } - @end // }}} + // Content view class for the GLFW window {{{ @interface GLFWContentView : NSView @@ -1271,7 +1271,7 @@ void _glfwPlatformUpdateIMEState(_GLFWwindow *w, int which, int a, int b, int c, @end // }}} -// GLFW Window class {{{ +// GLFW window class {{{ @interface GLFWWindow : NSWindow { _GLFWwindow* glfw_window; @@ -1371,7 +1371,7 @@ static bool createNativeWindow(_GLFWwindow* window, [window->ns.object setLevel:NSMainMenuWindowLevel + 1]; else { - [(NSWindow*)window->ns.object center]; + [(NSWindow*) window->ns.object center]; _glfw.ns.cascadePoint = NSPointToCGPoint([window->ns.object cascadeTopLeftFromPoint: NSPointFromCGPoint(_glfw.ns.cascadePoint)]); diff --git a/glfw/linux_joystick.c b/glfw/linux_joystick.c index 0cae51f09..d29471b38 100644 --- a/glfw/linux_joystick.c +++ b/glfw/linux_joystick.c @@ -222,7 +222,8 @@ static bool openJoystickDevice(const char* path) } } - _GLFWjoystick* js = _glfwAllocJoystick(name, guid, axisCount, buttonCount, hatCount); + _GLFWjoystick* js = + _glfwAllocJoystick(name, guid, axisCount, buttonCount, hatCount); if (!js) { close(linjs.fd); diff --git a/glfw/nsgl_context.h b/glfw/nsgl_context.h index 3e19a2ee9..e005e0add 100644 --- a/glfw/nsgl_context.h +++ b/glfw/nsgl_context.h @@ -32,8 +32,8 @@ // typedef struct _GLFWcontextNSGL { - id pixelFormat; - id object; + id pixelFormat; + id object; } _GLFWcontextNSGL;