24 #include "render/graphics.h"
36 static bool modeSorter(
const std::string &mode1,
const std::string &mode2)
38 const int width1 = atoi(mode1.substr(0, mode1.find(
'x')).c_str());
39 const int height1 = atoi(mode1.substr(mode1.find(
'x') + 1).c_str());
40 if ((width1 == 0) || (height1 == 0))
43 const int width2 = atoi(mode2.substr(0, mode2.find(
'x')).c_str());
44 const int height2 = atoi(mode2.substr(mode2.find(
'x') + 1).c_str());
45 if ((width2 == 0) || (height2 == 0))
48 return width1 < width2;
50 if (height1 != height2)
51 return height1 < height2;
94 std::string currentMode;
98 if (currentMode == widthXHeightMode)
int getIndexOf(const std::string &widthXHeightMode)
void addCustomMode(const std::string &mode)
std::string getElementAt(int i)
int getNumberOfElements()
static bool modeSorter(const std::string &mode1, const std::string &mode2)
std::string toString(T const &value)
converts any type to a string
bool getAllVideoModes(StringVect &modeList)
StringVect::const_iterator StringVectCIter