mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 10:48:51 -05:00
Moved variable definition to the function beginning.
This commit is contained in:
parent
02200c635e
commit
f50e43d47a
|
@ -191,6 +191,8 @@ GLFWAPI void glfwGetScrollOffset(GLFWwindow handle, int* xoffset, int* yoffset)
|
||||||
|
|
||||||
GLFWAPI void glfwSetCursorMode(GLFWwindow handle, int mode)
|
GLFWAPI void glfwSetCursorMode(GLFWwindow handle, int mode)
|
||||||
{
|
{
|
||||||
|
int centerPosX;
|
||||||
|
int centerPosY;
|
||||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||||
|
|
||||||
if (!_glfwInitialized)
|
if (!_glfwInitialized)
|
||||||
|
@ -210,8 +212,8 @@ GLFWAPI void glfwSetCursorMode(GLFWwindow handle, int mode)
|
||||||
if (window->cursorMode == mode)
|
if (window->cursorMode == mode)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int centerPosX = window->width / 2;
|
centerPosX = window->width / 2;
|
||||||
int centerPosY = window->height / 2;
|
centerPosY = window->height / 2;
|
||||||
|
|
||||||
if (mode == GLFW_CURSOR_CAPTURED)
|
if (mode == GLFW_CURSOR_CAPTURED)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user