Only set the monitor callback once.

This commit is contained in:
Camilla Berglund 2014-03-10 13:39:30 +01:00
parent a859c10fa1
commit d2cc815009

View File

@ -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);