Lines Matching refs:mode
26 // This test prints monitor and video mode information or verifies video
59 static const char* format_mode(const GLFWvidmode* mode)
62 const int gcd = euclid(mode->width, mode->height);
67 mode->width, mode->height,
68 mode->redBits + mode->greenBits + mode->blueBits,
69 mode->width / gcd, mode->height / gcd,
70 mode->redBits, mode->greenBits, mode->blueBits,
71 mode->refreshRate);
101 const GLFWvidmode* mode = glfwGetVideoMode(monitor);
112 printf("Current mode: %s\n", format_mode(mode));
117 width_mm, height_mm, mode->width * 25.4f / width_mm, mode->width, mode->height);
127 if (memcmp(mode, modes + i, sizeof(GLFWvidmode)) == 0)
128 printf(" (current mode)");
142 const GLFWvidmode* mode = modes + i;
145 glfwWindowHint(GLFW_RED_BITS, mode->redBits);
146 glfwWindowHint(GLFW_GREEN_BITS, mode->greenBits);
147 glfwWindowHint(GLFW_BLUE_BITS, mode->blueBits);
148 glfwWindowHint(GLFW_REFRESH_RATE, mode->refreshRate);
150 printf("Testing mode %u on monitor %s: %s\n",
153 format_mode(mode));
155 window = glfwCreateWindow(mode->width, mode->height,
161 printf("Failed to enter mode %u: %s\n",
163 format_mode(mode));
197 if (current.redBits != mode->redBits ||
198 current.greenBits != mode->greenBits ||
199 current.blueBits != mode->blueBits)
203 mode->redBits, mode->greenBits, mode->blueBits);
206 if (current.width != mode->width || current.height != mode->height)
210 mode->width, mode->height);
224 int ch, i, count, mode = LIST_MODE;
235 mode = TEST_MODE;
254 if (mode == LIST_MODE)
256 else if (mode == TEST_MODE)