mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 04:54:35 +00:00
Only set the monitor callback once.
This commit is contained in:
parent
a859c10fa1
commit
d2cc815009
@ -476,6 +476,8 @@ int main(int argc, char** argv)
|
||||
|
||||
printf("Library initialized\n");
|
||||
|
||||
glfwSetMonitorCallback(monitor_callback);
|
||||
|
||||
while ((ch = getopt(argc, argv, "hfn:")) != -1)
|
||||
{
|
||||
switch (ch)
|
||||
@ -557,8 +559,6 @@ int main(int argc, char** argv)
|
||||
|
||||
glfwSetWindowUserPointer(slots[i].window, slots + i);
|
||||
|
||||
glfwSetMonitorCallback(monitor_callback);
|
||||
|
||||
glfwSetWindowPosCallback(slots[i].window, window_pos_callback);
|
||||
glfwSetWindowSizeCallback(slots[i].window, window_size_callback);
|
||||
glfwSetFramebufferSizeCallback(slots[i].window, framebuffer_size_callback);
|
||||
|
Loading…
Reference in New Issue
Block a user