mirror of
https://github.com/glfw/glfw.git
synced 2024-11-25 22:14:34 +00:00
Formatting.
This commit is contained in:
parent
dd1a46af43
commit
93c3d52716
@ -103,21 +103,23 @@ static void test_modes(GLFWvidmode* modes, int count)
|
|||||||
|
|
||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
glfwOpenWindowHint(GLFW_RED_BITS, modes[i].redBits);
|
GLFWvidmode* mode = modes + i;
|
||||||
glfwOpenWindowHint(GLFW_GREEN_BITS, modes[i].greenBits);
|
|
||||||
glfwOpenWindowHint(GLFW_BLUE_BITS, modes[i].blueBits);
|
glfwOpenWindowHint(GLFW_RED_BITS, mode->redBits);
|
||||||
|
glfwOpenWindowHint(GLFW_GREEN_BITS, mode->greenBits);
|
||||||
|
glfwOpenWindowHint(GLFW_BLUE_BITS, mode->blueBits);
|
||||||
|
|
||||||
printf("Opening ");
|
printf("Opening ");
|
||||||
print_mode(modes + i);
|
print_mode(mode);
|
||||||
printf(" window\n");
|
printf(" window\n");
|
||||||
|
|
||||||
window = glfwOpenWindow(modes[i].width, modes[i].height,
|
window = glfwOpenWindow(mode->width, mode->height,
|
||||||
GLFW_FULLSCREEN, "Video Mode Test",
|
GLFW_FULLSCREEN, "Video Mode Test",
|
||||||
NULL);
|
NULL);
|
||||||
if (!window)
|
if (!window)
|
||||||
{
|
{
|
||||||
printf("Failed to enter mode %i: ", i);
|
printf("Failed to enter mode %i: ", i);
|
||||||
print_mode(modes + i);
|
print_mode(mode);
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -138,26 +140,26 @@ static void test_modes(GLFWvidmode* modes, int count)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (glfwGetWindowParam(window, GLFW_RED_BITS) != modes[i].redBits ||
|
if (glfwGetWindowParam(window, GLFW_RED_BITS) != mode->redBits ||
|
||||||
glfwGetWindowParam(window, GLFW_GREEN_BITS) != modes[i].greenBits ||
|
glfwGetWindowParam(window, GLFW_GREEN_BITS) != mode->greenBits ||
|
||||||
glfwGetWindowParam(window, GLFW_BLUE_BITS) != modes[i].blueBits)
|
glfwGetWindowParam(window, GLFW_BLUE_BITS) != mode->blueBits)
|
||||||
{
|
{
|
||||||
printf("*** Color bit mismatch: (%i %i %i) instead of (%i %i %i)\n",
|
printf("*** Color bit mismatch: (%i %i %i) instead of (%i %i %i)\n",
|
||||||
glfwGetWindowParam(window, GLFW_RED_BITS),
|
glfwGetWindowParam(window, GLFW_RED_BITS),
|
||||||
glfwGetWindowParam(window, GLFW_GREEN_BITS),
|
glfwGetWindowParam(window, GLFW_GREEN_BITS),
|
||||||
glfwGetWindowParam(window, GLFW_BLUE_BITS),
|
glfwGetWindowParam(window, GLFW_BLUE_BITS),
|
||||||
modes[i].redBits,
|
mode->redBits,
|
||||||
modes[i].greenBits,
|
mode->greenBits,
|
||||||
modes[i].blueBits);
|
mode->blueBits);
|
||||||
}
|
}
|
||||||
|
|
||||||
glfwGetWindowSize(window, &width, &height);
|
glfwGetWindowSize(window, &width, &height);
|
||||||
|
|
||||||
if (width != modes[i].width || height != modes[i].height)
|
if (width != mode->width || height != mode->height)
|
||||||
{
|
{
|
||||||
printf("*** Size mismatch: %ix%i instead of %ix%i\n",
|
printf("*** Size mismatch: %ix%i instead of %ix%i\n",
|
||||||
width, height,
|
width, height,
|
||||||
modes[i].width, modes[i].height);
|
mode->width, mode->height);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Closing window\n");
|
printf("Closing window\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user