From: Mikko Rasa Date: Fri, 24 Jan 2014 17:49:25 +0000 (+0200) Subject: Fill in more fields of DEVMODE to avoid a crash X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=5d8a8dbe07aaf8d9bd2c4c2982b34a877aee432f;p=libs%2Fgui.git Fill in more fields of DEVMODE to avoid a crash --- diff --git a/source/graphics/windows/display.cpp b/source/graphics/windows/display.cpp index 4c89333..428abcc 100644 --- a/source/graphics/windows/display.cpp +++ b/source/graphics/windows/display.cpp @@ -67,7 +67,11 @@ void Display::set_mode(const VideoMode &requested_mode, bool) throw unsupported_video_mode(requested_mode); DEVMODE info; + info.dmDeviceName[0] = 0; + info.dmSpecVersion = DM_SPECVERSION; + info.dmDriverVersion = 0; info.dmSize = sizeof(DEVMODE); + info.dmDriverExtra = 0; info.dmFields = DM_PELSWIDTH|DM_PELSHEIGHT; info.dmPelsWidth = mode->width; info.dmPelsHeight = mode->height;