Replaced glfwGetDesktopMode with glfwGetVideoMode.

This commit is contained in:
Camilla Berglund
2012-08-30 01:53:23 +02:00
parent e0ce920191
commit 89b42d084d
13 changed files with 56 additions and 66 deletions
+1 -1
View File
@@ -24,7 +24,7 @@
//========================================================================
//
// This test is used to test window activation and iconfication for
// fullscreen windows with a video mode differing from the desktop mode
// fullscreen windows with a video mode differing from the current mode
//
//========================================================================
+4 -4
View File
@@ -119,10 +119,10 @@ int main(int argc, char** argv)
if (mode == GLFW_FULLSCREEN)
{
GLFWvidmode desktop_mode;
glfwGetDesktopMode(&desktop_mode);
width = desktop_mode.width;
height = desktop_mode.height;
GLFWvidmode mode;
glfwGetVideoMode(glfwGetNextMonitor(NULL), &mode);
width = mode.width;
height = mode.height;
}
else
{
+4 -4
View File
@@ -100,10 +100,10 @@ int main(int argc, char** argv)
if (mode == GLFW_FULLSCREEN)
{
GLFWvidmode desktop_mode;
glfwGetDesktopMode(&desktop_mode);
width = desktop_mode.width;
height = desktop_mode.height;
GLFWvidmode current_mode;
glfwGetVideoMode(glfwGetNextMonitor(NULL), &current_mode);
width = current_mode.width;
height = current_mode.height;
}
else
{
Executable → Regular
+5 -5
View File
@@ -93,11 +93,11 @@ static void key_callback(GLFWwindow dummy, int key, int action)
static void list_modes(GLFWmonitor monitor)
{
int count, i;
GLFWvidmode desktop_mode;
GLFWvidmode mode;
GLFWvidmode* modes = glfwGetVideoModes(monitor, &count);
glfwGetDesktopMode(&desktop_mode);
printf("Desktop mode: %s\n", format_mode(&desktop_mode));
glfwGetVideoMode(monitor, &mode);
printf("Current mode: %s\n", format_mode(&mode));
printf("Monitor %s (%ix%i mm):\n",
glfwGetMonitorString(monitor, GLFW_MONITOR_NAME),
@@ -108,8 +108,8 @@ static void list_modes(GLFWmonitor monitor)
{
printf("%3u: %s", (unsigned int) i, format_mode(modes + i));
if (memcmp(&desktop_mode, modes + i, sizeof(GLFWvidmode)) == 0)
printf(" (desktop mode)");
if (memcmp(&mode, modes + i, sizeof(GLFWvidmode)) == 0)
printf(" (current mode)");
putchar('\n');
}