Removed duplicates of centerCursor function

This commit is contained in:
iamCaveLamp
2018-12-24 22:24:51 +02:00
committed by Camilla Löwy
parent 757cd3aea2
commit a46104ee69
6 changed files with 17 additions and 39 deletions

View File

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