Added window parameter to callbacks, handled NULL argument to glfwIsWindow.

This commit is contained in:
Camilla Berglund
2010-09-09 19:01:16 +02:00
parent 29a0ca47f9
commit e229ccd7c4
5 changed files with 29 additions and 23 deletions

View File

@@ -203,7 +203,7 @@ GLFWAPI void glfwSetMousePosCallback(GLFWwindow window, GLFWmouseposfun cbfun)
// Call the callback function to let the application know the current
// mouse position
if (cbfun)
cbfun(window->mousePosX, window->mousePosY);
cbfun(window, window->mousePosX, window->mousePosY);
}
@@ -222,6 +222,6 @@ GLFWAPI void glfwSetMouseWheelCallback(GLFWwindow window, GLFWmousewheelfun cbfu
// Call the callback function to let the application know the current
// mouse wheel position
if (cbfun)
cbfun(window->wheelPos);
cbfun(window, window->wheelPos);
}