From 5d8a8dbe07aaf8d9bd2c4c2982b34a877aee432f Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 24 Jan 2014 19:49:25 +0200 Subject: [PATCH] Fill in more fields of DEVMODE to avoid a crash --- source/graphics/windows/display.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.45.2