mirror of
https://github.com/glfw/glfw.git
synced 2026-09-21 00:30:57 +00:00
Replaced glfwGetDesktopMode with glfwGetVideoMode.
This commit is contained in:
+1
-1
@@ -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
@@ -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
@@ -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), ¤t_mode);
|
||||
width = current_mode.width;
|
||||
height = current_mode.height;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Executable → Regular
+5
-5
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user