From b0647d6c8a8f4057594f1b2e6c61f51fa1badc9f Mon Sep 17 00:00:00 2001 From: pvdk Date: Tue, 30 Oct 2012 19:05:44 +0100 Subject: [PATCH] Fix for Bug #413: resolutions no longer appear multiple times on Windows --- apps/launcher/graphicspage.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/apps/launcher/graphicspage.cpp b/apps/launcher/graphicspage.cpp index 7685cb3c2..2c4f3430c 100644 --- a/apps/launcher/graphicspage.cpp +++ b/apps/launcher/graphicspage.cpp @@ -281,20 +281,18 @@ QStringList GraphicsPage::getAvailableResolutions(Ogre::RenderSystem *renderer) assert (tokens.size() >= 3); QString resolutionStr = tokens.at(0) + QString(" x ") + tokens.at(2); - // do not add duplicate resolutions - if (!result.contains(resolutionStr)) { - - QString aspect = getAspect(tokens.at(0).toInt(),tokens.at(2).toInt()); + QString aspect = getAspect(tokens.at(0).toInt(),tokens.at(2).toInt()); - if (aspect == QLatin1String("16:9") || aspect == QLatin1String("16:10")) { - resolutionStr.append(tr("\t(Widescreen ") + aspect + ")"); + if (aspect == QLatin1String("16:9") || aspect == QLatin1String("16:10")) { + resolutionStr.append(tr("\t(Widescreen ") + aspect + ")"); - } else if (aspect == QLatin1String("4:3")) { - resolutionStr.append(tr("\t(Standard 4:3)")); - } + } else if (aspect == QLatin1String("4:3")) { + resolutionStr.append(tr("\t(Standard 4:3)")); + } + // do not add duplicate resolutions + if (!result.contains(resolutionStr)) result << resolutionStr; - } } }