mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-26 20:28:49 -05: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");
|
printf("Library initialized\n");
|
||||||
|
|
||||||
|
glfwSetMonitorCallback(monitor_callback);
|
||||||
|
|
||||||
while ((ch = getopt(argc, argv, "hfn:")) != -1)
|
while ((ch = getopt(argc, argv, "hfn:")) != -1)
|
||||||
{
|
{
|
||||||
switch (ch)
|
switch (ch)
|
||||||
|
@ -557,8 +559,6 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
glfwSetWindowUserPointer(slots[i].window, slots + i);
|
glfwSetWindowUserPointer(slots[i].window, slots + i);
|
||||||
|
|
||||||
glfwSetMonitorCallback(monitor_callback);
|
|
||||||
|
|
||||||
glfwSetWindowPosCallback(slots[i].window, window_pos_callback);
|
glfwSetWindowPosCallback(slots[i].window, window_pos_callback);
|
||||||
glfwSetWindowSizeCallback(slots[i].window, window_size_callback);
|
glfwSetWindowSizeCallback(slots[i].window, window_size_callback);
|
||||||
glfwSetFramebufferSizeCallback(slots[i].window, framebuffer_size_callback);
|
glfwSetFramebufferSizeCallback(slots[i].window, framebuffer_size_callback);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user