mirror of
https://github.com/glfw/glfw.git
synced 2026-09-21 08:39:45 +00:00
Added pointer swap macro for callback setters.
This commit is contained in:
+2
-5
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user