mirror of
https://github.com/glfw/glfw.git
synced 2026-01-11 15:23:17 +01:00
Made reopen test pick a monitor at random.
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user