mirror of
https://github.com/glfw/glfw.git
synced 2026-02-17 21:12:34 +01:00
Removed duplicates of centerCursor function
This commit is contained in:
committed by
Camilla Löwy
parent
757cd3aea2
commit
a46104ee69
@@ -453,6 +453,15 @@ void _glfwFreeJoystick(_GLFWjoystick* js)
|
||||
memset(js, 0, sizeof(_GLFWjoystick));
|
||||
}
|
||||
|
||||
// Center the cursor in the middle of the window
|
||||
//
|
||||
void _glfwCenterCursor(_GLFWwindow* window)
|
||||
{
|
||||
int width, height;
|
||||
|
||||
_glfwPlatformGetWindowSize(window, &width, &height);
|
||||
_glfwPlatformSetCursorPos(window, width / 2.0, height / 2.0);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
////// GLFW public API //////
|
||||
|
||||
Reference in New Issue
Block a user