From ac291f5beac7b373bad34f0c5a34b9f8cd761db7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Kapu=C5=9Bci=C5=84ski?= Date: Sun, 28 Jun 2015 21:05:12 +0200 Subject: [PATCH] Fix for issue #488 --- src/app/app.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/app.cpp b/src/app/app.cpp index 6eb0ecf2..e3814d50 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -463,6 +463,12 @@ bool CApplication::Create() // load settings from profile int iValue; std::string sValue; + + // GetVideoResolutionList() has to be called here because it is responsible + // for list of resolutions in options menu, not calling it results in empty list + std::vector modes; + GetVideoResolutionList(modes, true, true); + if ( GetProfile().GetStringProperty("Setup", "Resolution", sValue) && !m_resolutionOverride ) { std::istringstream resolution(sValue); @@ -476,8 +482,6 @@ bool CApplication::Create() } // Why not just set m_deviceConfig.size to w,h? Because this way if the resolution is no longer supported (e.g. changimg monitor) defaults will be used instead - std::vector modes; - GetVideoResolutionList(modes, true, true); for(auto it = modes.begin(); it != modes.end(); ++it) { if (it->x == w && it->y == h) { m_deviceConfig.size = *it;