mirror of
https://github.com/glfw/glfw.git
synced 2025-10-04 13:46:37 +00:00
Removed duplicates of centerCursor function
This commit is contained in:
parent
4631ac3ae1
commit
0eacac1287
@ -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);
|
||||
|
@ -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)))
|
||||
|
Loading…
Reference in New Issue
Block a user