From 0eacac1287c7625339fe76904c6fff9ee802aa82 Mon Sep 17 00:00:00 2001 From: iamCaveLamp Date: Tue, 25 Dec 2018 20:58:50 +0200 Subject: [PATCH] Removed duplicates of centerCursor function --- src/cocoa_window.m | 8 ++++---- src/win32_window.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 726fea08b..4b1da0a1d 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -128,7 +128,7 @@ static void updateCursorMode(_GLFWwindow* window) _glfwPlatformGetCursorPos(window, &_glfw.ns.restoreCursorPosX, &_glfw.ns.restoreCursorPosY); - _glfwPlatformCenterCursor(window); + _glfwCenterCursor(window); CGAssociateMouseAndMouseCursorPosition(false); } else if (_glfw.ns.disabledCursorWindow == window) @@ -273,7 +273,7 @@ static const NSRange kEmptyRange = { NSNotFound, 0 }; [window->context.nsgl.object update]; if (_glfw.ns.disabledCursorWindow == window) - _glfwPlatformCenterCursor(window); + _glfwCenterCursor(window); const int maximized = [window->ns.object isZoomed]; if (window->ns.maximized != maximized) @@ -308,7 +308,7 @@ static const NSRange kEmptyRange = { NSNotFound, 0 }; [window->context.nsgl.object update]; if (_glfw.ns.disabledCursorWindow == window) - _glfwPlatformCenterCursor(window); + _glfwCenterCursor(window); int x, y; _glfwPlatformGetWindowPos(window, &x, &y); @@ -334,7 +334,7 @@ static const NSRange kEmptyRange = { NSNotFound, 0 }; - (void)windowDidBecomeKey:(NSNotification *)notification { if (_glfw.ns.disabledCursorWindow == window) - _glfwPlatformCenterCursor(window); + _glfwCenterCursor(window); _glfwInputWindowFocus(window, GLFW_TRUE); updateCursorMode(window); diff --git a/src/win32_window.c b/src/win32_window.c index 326c81aa0..39cab15f7 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -278,7 +278,7 @@ static void disableCursor(_GLFWwindow* window) &_glfw.win32.restoreCursorPosX, &_glfw.win32.restoreCursorPosY); updateCursorImage(window); - _glfwPlatformCenterCursor(window); + _glfwCursor(window); updateClipRect(window); if (!RegisterRawInputDevices(&rid, 1, sizeof(rid)))