From 296b0a39a04770e8edeae2e8fbdc2ed045873329 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Sun, 9 Jun 2013 11:45:51 +0200 Subject: [PATCH] Added zeroing of DEVMODE. --- src/win32_monitor.c | 1 + 1 file changed, 1 insertion(+) 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;