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,
|
_glfwPlatformGetCursorPos(window,
|
||||||
&_glfw.ns.restoreCursorPosX,
|
&_glfw.ns.restoreCursorPosX,
|
||||||
&_glfw.ns.restoreCursorPosY);
|
&_glfw.ns.restoreCursorPosY);
|
||||||
_glfwPlatformCenterCursor(window);
|
_glfwCenterCursor(window);
|
||||||
CGAssociateMouseAndMouseCursorPosition(false);
|
CGAssociateMouseAndMouseCursorPosition(false);
|
||||||
}
|
}
|
||||||
else if (_glfw.ns.disabledCursorWindow == window)
|
else if (_glfw.ns.disabledCursorWindow == window)
|
||||||
@ -273,7 +273,7 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
|
|||||||
[window->context.nsgl.object update];
|
[window->context.nsgl.object update];
|
||||||
|
|
||||||
if (_glfw.ns.disabledCursorWindow == window)
|
if (_glfw.ns.disabledCursorWindow == window)
|
||||||
_glfwPlatformCenterCursor(window);
|
_glfwCenterCursor(window);
|
||||||
|
|
||||||
const int maximized = [window->ns.object isZoomed];
|
const int maximized = [window->ns.object isZoomed];
|
||||||
if (window->ns.maximized != maximized)
|
if (window->ns.maximized != maximized)
|
||||||
@ -308,7 +308,7 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
|
|||||||
[window->context.nsgl.object update];
|
[window->context.nsgl.object update];
|
||||||
|
|
||||||
if (_glfw.ns.disabledCursorWindow == window)
|
if (_glfw.ns.disabledCursorWindow == window)
|
||||||
_glfwPlatformCenterCursor(window);
|
_glfwCenterCursor(window);
|
||||||
|
|
||||||
int x, y;
|
int x, y;
|
||||||
_glfwPlatformGetWindowPos(window, &x, &y);
|
_glfwPlatformGetWindowPos(window, &x, &y);
|
||||||
@ -334,7 +334,7 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
|
|||||||
- (void)windowDidBecomeKey:(NSNotification *)notification
|
- (void)windowDidBecomeKey:(NSNotification *)notification
|
||||||
{
|
{
|
||||||
if (_glfw.ns.disabledCursorWindow == window)
|
if (_glfw.ns.disabledCursorWindow == window)
|
||||||
_glfwPlatformCenterCursor(window);
|
_glfwCenterCursor(window);
|
||||||
|
|
||||||
_glfwInputWindowFocus(window, GLFW_TRUE);
|
_glfwInputWindowFocus(window, GLFW_TRUE);
|
||||||
updateCursorMode(window);
|
updateCursorMode(window);
|
||||||
|
@ -278,7 +278,7 @@ static void disableCursor(_GLFWwindow* window)
|
|||||||
&_glfw.win32.restoreCursorPosX,
|
&_glfw.win32.restoreCursorPosX,
|
||||||
&_glfw.win32.restoreCursorPosY);
|
&_glfw.win32.restoreCursorPosY);
|
||||||
updateCursorImage(window);
|
updateCursorImage(window);
|
||||||
_glfwPlatformCenterCursor(window);
|
_glfwCursor(window);
|
||||||
updateClipRect(window);
|
updateClipRect(window);
|
||||||
|
|
||||||
if (!RegisterRawInputDevices(&rid, 1, sizeof(rid)))
|
if (!RegisterRawInputDevices(&rid, 1, sizeof(rid)))
|
||||||
|
Loading…
Reference in New Issue
Block a user