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