mirror of
https://github.com/glfw/glfw.git
synced 2026-11-21 06:02:19 +00:00
Merge branch 'master' into multi-monitor
Conflicts: examples/wave.c src/init.c src/internal.h src/window.c tests/accuracy.c tests/events.c tests/reopen.c
This commit is contained in:
+7
-4
@@ -127,10 +127,6 @@ static void test_modes(GLFWmonitor monitor)
|
||||
int i, count;
|
||||
GLFWvidmode* modes = glfwGetVideoModes(monitor, &count);
|
||||
|
||||
glfwSetWindowSizeCallback(window_size_callback);
|
||||
glfwSetWindowCloseCallback(window_close_callback);
|
||||
glfwSetKeyCallback(key_callback);
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
GLFWvidmode* mode = modes + i;
|
||||
@@ -157,6 +153,10 @@ static void test_modes(GLFWmonitor monitor)
|
||||
continue;
|
||||
}
|
||||
|
||||
glfwSetWindowSizeCallback(window_handle, window_size_callback);
|
||||
glfwSetWindowCloseCallback(window_handle, window_close_callback);
|
||||
glfwSetKeyCallback(window_handle, key_callback);
|
||||
|
||||
glfwMakeContextCurrent(window_handle);
|
||||
glfwSwapInterval(1);
|
||||
|
||||
@@ -171,6 +171,8 @@ static void test_modes(GLFWmonitor monitor)
|
||||
if (!window_handle)
|
||||
{
|
||||
printf("User terminated program\n");
|
||||
|
||||
glfwTerminate();
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
@@ -244,6 +246,7 @@ int main(int argc, char** argv)
|
||||
test_modes(monitors[i]);
|
||||
}
|
||||
|
||||
glfwTerminate();
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user