Move full screen cursor centering to shared code

This commit is contained in:
Camilla Löwy
2018-02-06 14:32:43 +01:00
parent b020467192
commit 58cc4b2c5c
4 changed files with 10 additions and 10 deletions
+10 -1
View File
@@ -226,7 +226,16 @@ GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height,
}
}
if (!window->monitor)
if (window->monitor)
{
if (wndconfig.centerCursor)
{
int width, height;
_glfwPlatformGetWindowSize(window, &width, &height);
_glfwPlatformSetCursorPos(window, width / 2.0, height / 2.0);
}
}
else
{
if (wndconfig.visible)
{