mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 02:38:52 -05: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;
|
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))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user