From 7839dce6241e4df9f549e9f7f171ac6a2d66150f Mon Sep 17 00:00:00 2001 From: krzys-h Date: Fri, 25 Sep 2015 11:16:09 +0200 Subject: [PATCH] Fixed duplicate resolutions appearing on the list --- src/app/app.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/app.cpp b/src/app/app.cpp index ecdaa5e9..19b7fe73 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -1399,8 +1399,10 @@ void CApplication::GetVideoResolutionList(std::vector &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); } }