Desktop mode full screen fixes for tests.
This commit is contained in:
parent
b3c461bd7e
commit
91e069f979
@ -465,7 +465,7 @@ int main(int argc, char** argv)
|
|||||||
{
|
{
|
||||||
Slot* slots;
|
Slot* slots;
|
||||||
GLFWmonitor* monitor = NULL;
|
GLFWmonitor* monitor = NULL;
|
||||||
int ch, i, count = 1;
|
int ch, i, width, height, count = 1;
|
||||||
|
|
||||||
setlocale(LC_ALL, "");
|
setlocale(LC_ALL, "");
|
||||||
|
|
||||||
@ -494,6 +494,24 @@ int main(int argc, char** argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (monitor)
|
||||||
|
{
|
||||||
|
const GLFWvidmode* mode = glfwGetVideoMode(monitor);
|
||||||
|
|
||||||
|
glfwWindowHint(GLFW_REFRESH_RATE, mode->refreshRate);
|
||||||
|
glfwWindowHint(GLFW_RED_BITS, mode->redBits);
|
||||||
|
glfwWindowHint(GLFW_GREEN_BITS, mode->greenBits);
|
||||||
|
glfwWindowHint(GLFW_BLUE_BITS, mode->blueBits);
|
||||||
|
|
||||||
|
width = mode->width;
|
||||||
|
height = mode->height;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
width = 640;
|
||||||
|
height = 480;
|
||||||
|
}
|
||||||
|
|
||||||
if (!count)
|
if (!count)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Invalid user\n");
|
fprintf(stderr, "Invalid user\n");
|
||||||
@ -511,7 +529,7 @@ int main(int argc, char** argv)
|
|||||||
|
|
||||||
sprintf(title, "Event Linter (Window %i)", slots[i].number);
|
sprintf(title, "Event Linter (Window %i)", slots[i].number);
|
||||||
|
|
||||||
slots[i].window = glfwCreateWindow(640, 480, title, monitor, NULL);
|
slots[i].window = glfwCreateWindow(width, height, title, monitor, NULL);
|
||||||
if (!slots[i].window)
|
if (!slots[i].window)
|
||||||
{
|
{
|
||||||
free(slots);
|
free(slots);
|
||||||
|
@ -128,6 +128,12 @@ int main(int argc, char** argv)
|
|||||||
if (monitor)
|
if (monitor)
|
||||||
{
|
{
|
||||||
const GLFWvidmode* mode = glfwGetVideoMode(monitor);
|
const GLFWvidmode* mode = glfwGetVideoMode(monitor);
|
||||||
|
|
||||||
|
glfwWindowHint(GLFW_REFRESH_RATE, mode->refreshRate);
|
||||||
|
glfwWindowHint(GLFW_RED_BITS, mode->redBits);
|
||||||
|
glfwWindowHint(GLFW_GREEN_BITS, mode->greenBits);
|
||||||
|
glfwWindowHint(GLFW_BLUE_BITS, mode->blueBits);
|
||||||
|
|
||||||
width = mode->width;
|
width = mode->width;
|
||||||
height = mode->height;
|
height = mode->height;
|
||||||
}
|
}
|
||||||
|
@ -123,6 +123,12 @@ int main(int argc, char** argv)
|
|||||||
if (monitor)
|
if (monitor)
|
||||||
{
|
{
|
||||||
const GLFWvidmode* mode = glfwGetVideoMode(monitor);
|
const GLFWvidmode* mode = glfwGetVideoMode(monitor);
|
||||||
|
|
||||||
|
glfwWindowHint(GLFW_REFRESH_RATE, mode->refreshRate);
|
||||||
|
glfwWindowHint(GLFW_RED_BITS, mode->redBits);
|
||||||
|
glfwWindowHint(GLFW_GREEN_BITS, mode->greenBits);
|
||||||
|
glfwWindowHint(GLFW_BLUE_BITS, mode->blueBits);
|
||||||
|
|
||||||
width = mode->width;
|
width = mode->width;
|
||||||
height = mode->height;
|
height = mode->height;
|
||||||
}
|
}
|
||||||
|
@ -125,6 +125,7 @@ static void test_modes(GLFWmonitor* monitor)
|
|||||||
glfwWindowHint(GLFW_RED_BITS, mode->redBits);
|
glfwWindowHint(GLFW_RED_BITS, mode->redBits);
|
||||||
glfwWindowHint(GLFW_GREEN_BITS, mode->greenBits);
|
glfwWindowHint(GLFW_GREEN_BITS, mode->greenBits);
|
||||||
glfwWindowHint(GLFW_BLUE_BITS, mode->blueBits);
|
glfwWindowHint(GLFW_BLUE_BITS, mode->blueBits);
|
||||||
|
glfwWindowHint(GLFW_REFRESH_RATE, mode->refreshRate);
|
||||||
|
|
||||||
printf("Testing mode %u on monitor %s: %s\n",
|
printf("Testing mode %u on monitor %s: %s\n",
|
||||||
(unsigned int) i,
|
(unsigned int) i,
|
||||||
|
Loading…
Reference in New Issue
Block a user