[colobot] 04/377: Fixed duplicate resolutions appearing on the list
Didier Raboud
odyx at moszumanska.debian.org
Wed Mar 30 13:33:51 UTC 2016
This is an automated email from the git hooks/post-receive script.
odyx pushed a commit to branch debian/master
in repository colobot.
commit 7839dce6241e4df9f549e9f7f171ac6a2d66150f
Author: krzys-h <krzys_h at interia.pl>
Date: Fri Sep 25 11:16:09 2015 +0200
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 ecdaa5e..19b7fe7 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -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);
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git
More information about the Pkg-games-commits
mailing list