mirror of
https://github.com/glfw/glfw.git
synced 2026-09-17 22:32:50 +00:00
Cleanup.
This commit is contained in:
+1
-1
@@ -120,7 +120,7 @@ int main(int argc, char** argv)
|
||||
if (mode == GLFW_FULLSCREEN)
|
||||
{
|
||||
GLFWvidmode mode;
|
||||
glfwGetVideoMode(glfwGetNextMonitor(NULL), &mode);
|
||||
glfwGetVideoMode(glfwGetPrimaryMonitor(), &mode);
|
||||
width = mode.width;
|
||||
height = mode.height;
|
||||
}
|
||||
|
||||
+1
-1
@@ -101,7 +101,7 @@ int main(int argc, char** argv)
|
||||
if (mode == GLFW_FULLSCREEN)
|
||||
{
|
||||
GLFWvidmode current_mode;
|
||||
glfwGetVideoMode(glfwGetNextMonitor(NULL), ¤t_mode);
|
||||
glfwGetVideoMode(glfwGetPrimaryMonitor(), ¤t_mode);
|
||||
width = current_mode.width;
|
||||
height = current_mode.height;
|
||||
}
|
||||
|
||||
+7
-5
@@ -199,8 +199,8 @@ static void test_modes(GLFWmonitor monitor)
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int ch, mode = LIST_MODE;
|
||||
GLFWmonitor monitor = NULL;
|
||||
int ch, i, count, mode = LIST_MODE;
|
||||
GLFWmonitor* monitors;
|
||||
|
||||
while ((ch = getopt(argc, argv, "th")) != -1)
|
||||
{
|
||||
@@ -226,12 +226,14 @@ int main(int argc, char** argv)
|
||||
if (!glfwInit())
|
||||
exit(EXIT_FAILURE);
|
||||
|
||||
while ((monitor = glfwGetNextMonitor(monitor)))
|
||||
monitors = glfwGetMonitors(&count);
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
if (mode == LIST_MODE)
|
||||
list_modes(monitor);
|
||||
list_modes(monitors[i]);
|
||||
else if (mode == TEST_MODE)
|
||||
test_modes(monitor);
|
||||
test_modes(monitors[i]);
|
||||
}
|
||||
|
||||
exit(EXIT_SUCCESS);
|
||||
|
||||
Reference in New Issue
Block a user