From f50e43d47a282ba12fe8e76f5252566b8383befb Mon Sep 17 00:00:00 2001 From: Marcel Metz Date: Sat, 1 Oct 2011 01:32:12 -0400 Subject: [PATCH] Moved variable definition to the function beginning. --- src/input.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/input.c b/src/input.c index 04c835a4..983a05ee 100644 --- a/src/input.c +++ b/src/input.c @@ -191,6 +191,8 @@ GLFWAPI void glfwGetScrollOffset(GLFWwindow handle, int* xoffset, int* yoffset) GLFWAPI void glfwSetCursorMode(GLFWwindow handle, int mode) { + int centerPosX; + int centerPosY; _GLFWwindow* window = (_GLFWwindow*) handle; if (!_glfwInitialized) @@ -210,8 +212,8 @@ GLFWAPI void glfwSetCursorMode(GLFWwindow handle, int mode) if (window->cursorMode == mode) return; - int centerPosX = window->width / 2; - int centerPosY = window->height / 2; + centerPosX = window->width / 2; + centerPosY = window->height / 2; if (mode == GLFW_CURSOR_CAPTURED) {