mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Remove duplicated resolutions, e.g. different frequency
This commit is contained in:
parent
8b27780c11
commit
97d266ea2d
@ -471,5 +471,13 @@ std::vector<Point> WindowHandler::getSupportedResolutions( int displayIndex) con
|
||||
|
||||
result.push_back(resolution);
|
||||
}
|
||||
|
||||
boost::range::sort(result, [](const auto & left, const auto & right)
|
||||
{
|
||||
return left.x * left.y < right.x * right.y;
|
||||
});
|
||||
|
||||
result.erase(boost::unique(result).end(), result.end());
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -185,11 +185,6 @@ void GeneralOptionsTab::selectGameResolution()
|
||||
{
|
||||
supportedResolutions = GH.windowHandler().getSupportedResolutions();
|
||||
|
||||
boost::range::sort(supportedResolutions, [](const auto & left, const auto & right)
|
||||
{
|
||||
return left.x * left.y < right.x * right.y;
|
||||
});
|
||||
|
||||
std::vector<std::string> items;
|
||||
size_t currentResolutionIndex = 0;
|
||||
size_t i = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user