]> git.tdb.fi Git - libs/gui.git/blobdiff - source/graphics/windows/display.cpp
Expose a lot more information through the Monitor struct
[libs/gui.git] / source / graphics / windows / display.cpp
index 43f86995b893343b1a2257053c5ac61b95773d9c..6553a8c692163772ca877e09fa1f26a8d6834271 100644 (file)
@@ -78,6 +78,10 @@ void Display::set_mode(const VideoMode &requested_mode, bool)
        LONG ret = ChangeDisplaySettingsEx(priv->monitors[mode->monitor->index].c_str(), &info, NULL, CDS_FULLSCREEN, NULL);
        if(ret!=DISP_CHANGE_SUCCESSFUL)
                throw unsupported_video_mode(requested_mode);
+
+       for(list<Monitor>::iterator i=monitors.begin(); i!=monitors.end(); ++i)
+               if(&*i==mode->monitor)
+                       i->current_mode = mode;
 }
 
 bool Display::process_events()