]> git.tdb.fi Git - libs/gui.git/commitdiff
Fill in more fields of DEVMODE to avoid a crash
authorMikko Rasa <tdb@tdb.fi>
Fri, 24 Jan 2014 17:49:25 +0000 (19:49 +0200)
committerMikko Rasa <tdb@tdb.fi>
Fri, 24 Jan 2014 17:49:25 +0000 (19:49 +0200)
source/graphics/windows/display.cpp

index 4c893335c9ec06cd3fafbef01f5c7618c482159e..428abcc248f1f0fa2a613a95588078ace653fa3d 100644 (file)
@@ -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;