From 7ed54e8c7665a95cb3d69889a26b24fe081cec1e Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 8 Nov 2015 13:43:02 +0100 Subject: [PATCH] Changed: More comments --- code/ryzom/client/src/misc.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/code/ryzom/client/src/misc.cpp b/code/ryzom/client/src/misc.cpp index fd58729e6..e6b15c2d7 100644 --- a/code/ryzom/client/src/misc.cpp +++ b/code/ryzom/client/src/misc.cpp @@ -1403,19 +1403,25 @@ bool getRyzomModes(std::vector &videoModes, std::vectorgetModes(videoModes); + // Remove modes under 800x600 and get the unique strings sint i, j; - for (i=0; i < (sint)videoModes.size(); ++i) + for (i = 0; i < (sint)videoModes.size(); ++i) { if ((videoModes[i].Width < 800) || (videoModes[i].Height < 600)) { + // discard modes under 800x600 videoModes.erase(videoModes.begin()+i); --i; } else { bool bFound = false; + + // create string format with width and height string res = toString(videoModes[i].Width)+" x "+toString(videoModes[i].Height); + + // check if video mode already found in list for (j = 0; j < (sint)stringModeList.size(); ++j) { if (stringModeList[j] == res) @@ -1424,12 +1430,17 @@ bool getRyzomModes(std::vector &videoModes, std::vector &videoModes, std::vector= videoModes[nFoundMode].Width) && (videoModes[i].Height >= videoModes[nFoundMode].Height)) { @@ -1459,8 +1471,9 @@ bool getRyzomModes(std::vector &videoModes, std::vector