mirror of
https://github.com/glfw/glfw.git
synced 2024-11-25 19:42:00 +00:00
Made reopen test pick a monitor at random.
This commit is contained in:
parent
b6926b1836
commit
94f5b28152
@ -120,7 +120,11 @@ int main(int argc, char** argv)
|
||||
GLFWmonitor* monitor = NULL;
|
||||
|
||||
if (count & 1)
|
||||
monitor = glfwGetPrimaryMonitor();
|
||||
{
|
||||
int monitorCount;
|
||||
GLFWmonitor** monitors = glfwGetMonitors(&monitorCount);
|
||||
monitor = monitors[rand() % monitorCount];
|
||||
}
|
||||
|
||||
if (!open_window(640, 480, monitor))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user