diff --git a/src/win32_monitor.c b/src/win32_monitor.c index af5485af..9bcd97db 100644 --- a/src/win32_monitor.c +++ b/src/win32_monitor.c @@ -62,6 +62,7 @@ GLboolean _glfwSetVideoMode(_GLFWmonitor* monitor, const GLFWvidmode* desired) if (_glfwCompareVideoModes(¤t, best) == 0) return GL_TRUE; + ZeroMemory(&dm, sizeof(dm)); dm.dmSize = sizeof(DEVMODE); dm.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL | DM_DISPLAYFREQUENCY;