mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-07-20 19:44:05 +00:00
Fix for Bug #413: resolutions no longer appear multiple times on Windows
This commit is contained in:
parent
60aea3653f
commit
b0647d6c8a
1 changed files with 9 additions and 11 deletions
|
@ -281,20 +281,18 @@ QStringList GraphicsPage::getAvailableResolutions(Ogre::RenderSystem *renderer)
|
||||||
assert (tokens.size() >= 3);
|
assert (tokens.size() >= 3);
|
||||||
QString resolutionStr = tokens.at(0) + QString(" x ") + tokens.at(2);
|
QString resolutionStr = tokens.at(0) + QString(" x ") + tokens.at(2);
|
||||||
|
|
||||||
// do not add duplicate resolutions
|
QString aspect = getAspect(tokens.at(0).toInt(),tokens.at(2).toInt());
|
||||||
if (!result.contains(resolutionStr)) {
|
|
||||||
|
|
||||||
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")) {
|
} else if (aspect == QLatin1String("4:3")) {
|
||||||
resolutionStr.append(tr("\t(Widescreen ") + aspect + ")");
|
resolutionStr.append(tr("\t(Standard 4:3)"));
|
||||||
|
|
||||||
} else if (aspect == QLatin1String("4:3")) {
|
|
||||||
resolutionStr.append(tr("\t(Standard 4:3)"));
|
|
||||||
}
|
|
||||||
|
|
||||||
result << resolutionStr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// do not add duplicate resolutions
|
||||||
|
if (!result.contains(resolutionStr))
|
||||||
|
result << resolutionStr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue