mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 14:24:35 +00:00
Fixed meaningless Win32 video mode restore.
This commit is contained in:
parent
128e678815
commit
96433cdf19
@ -81,15 +81,20 @@ GLboolean _glfwSetVideoMode(_GLFWmonitor* monitor, const GLFWvidmode* desired)
|
|||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
monitor->win32.modeChanged = GL_TRUE;
|
||||||
return GL_TRUE;
|
return GL_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Restore the previously saved (original) video mode
|
// Restore the previously saved (original) video mode
|
||||||
//
|
//
|
||||||
void _glfwRestoreVideoMode(_GLFWmonitor* monitor)
|
void _glfwRestoreVideoMode(_GLFWmonitor* monitor)
|
||||||
|
{
|
||||||
|
if (monitor->win32.modeChanged)
|
||||||
{
|
{
|
||||||
ChangeDisplaySettingsEx(monitor->win32.name,
|
ChangeDisplaySettingsEx(monitor->win32.name,
|
||||||
NULL, NULL, CDS_FULLSCREEN, NULL);
|
NULL, NULL, CDS_FULLSCREEN, NULL);
|
||||||
|
monitor->win32.modeChanged = GL_FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -234,6 +234,7 @@ typedef struct _GLFWmonitorWin32
|
|||||||
{
|
{
|
||||||
// This size matches the static size of DISPLAY_DEVICE.DeviceName
|
// This size matches the static size of DISPLAY_DEVICE.DeviceName
|
||||||
WCHAR name[32];
|
WCHAR name[32];
|
||||||
|
GLboolean modeChanged;
|
||||||
|
|
||||||
} _GLFWmonitorWin32;
|
} _GLFWmonitorWin32;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user