1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-22 18:28:52 -05:00

Made reopen test pick a monitor at random.

This commit is contained in:
Camilla Berglund 2013-02-14 17:22:22 +01:00
parent b6926b1836
commit 94f5b28152

View File

@ -120,7 +120,11 @@ int main(int argc, char** argv)
GLFWmonitor* monitor = NULL; GLFWmonitor* monitor = NULL;
if (count & 1) if (count & 1)
monitor = glfwGetPrimaryMonitor(); {
int monitorCount;
GLFWmonitor** monitors = glfwGetMonitors(&monitorCount);
monitor = monitors[rand() % monitorCount];
}
if (!open_window(640, 480, monitor)) if (!open_window(640, 480, monitor))
{ {