Fixed duplicate resolutions appearing on the list

dev-time-step
krzys-h 2015-09-25 11:16:09 +02:00
parent dfa06dafcf
commit 7839dce624
1 changed files with 3 additions and 1 deletions

View File

@ -1399,8 +1399,10 @@ void CApplication::GetVideoResolutionList(std::vector<Math::IntPoint> &resolutio
{
SDL_DisplayMode mode;
SDL_GetDisplayMode(display, i, &mode);
Math::IntPoint resolution = Math::IntPoint(mode.w, mode.h);
resolutions.push_back(Math::IntPoint(mode.w, mode.h));
if (std::find(resolutions.begin(), resolutions.end(), resolution) == resolutions.end())
resolutions.push_back(resolution);
}
}