Added pointer swap macro for callback setters.

This commit is contained in:
Camilla Berglund
2013-07-30 14:43:01 +02:00
parent 9d0e102135
commit f7282e86c0
5 changed files with 39 additions and 86 deletions
+2 -5
View File
@@ -328,12 +328,9 @@ GLFWAPI const char* glfwGetMonitorName(GLFWmonitor* handle)
GLFWAPI GLFWmonitorfun glfwSetMonitorCallback(GLFWmonitorfun cbfun)
{
GLFWmonitorfun previous;
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
previous = _glfw.monitorCallback;
_glfw.monitorCallback = cbfun;
return previous;
_GLFW_SWAP_POINTERS(_glfw.monitorCallback, cbfun);
return cbfun;
}
GLFWAPI const GLFWvidmode* glfwGetVideoModes(GLFWmonitor* handle, int* count)