Removed duplicates of centerCursor function

This commit is contained in:
iamCaveLamp 2018-12-25 20:58:50 +02:00
parent 4631ac3ae1
commit 0eacac1287
2 changed files with 5 additions and 5 deletions

View File

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

View File

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