]> git.tdb.fi Git - libs/gui.git/blobdiff - source/graphics/windows/display.cpp
Generate and handle WM_CHAR messages on Windows
[libs/gui.git] / source / graphics / windows / display.cpp
index 4c893335c9ec06cd3fafbef01f5c7618c482159e..fdae09e362e5abe25c8c29d34a5380d351a6b1ae 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;
@@ -91,6 +95,7 @@ bool Display::process_events()
        MSG msg;
        if(PeekMessage(&msg, 0, 0, 0, PM_REMOVE))
        {
+               TranslateMessage(&msg);
                DispatchMessage(&msg);
                return true;
        }