summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-09-06 23:53:50 +0300
committerAndrei Karas <akaras@inbox.ru>2017-09-07 01:56:53 +0300
commitbfe9b1eeb587254d92c3ebb338b50ce1e7dfac79 (patch)
tree48114321787b15030ae193d713b2ad80d634c852
parentc7cc189b3007321b09c0c49de74baeef5b18606a (diff)
downloadplus-bfe9b1eeb587254d92c3ebb338b50ce1e7dfac79.tar.gz
plus-bfe9b1eeb587254d92c3ebb338b50ce1e7dfac79.tar.bz2
plus-bfe9b1eeb587254d92c3ebb338b50ce1e7dfac79.tar.xz
plus-bfe9b1eeb587254d92c3ebb338b50ce1e7dfac79.zip
Remove useless calls in SDL::getAllVideoModes for SDL2.
-rw-r--r--src/utils/sdl2helper.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/utils/sdl2helper.cpp b/src/utils/sdl2helper.cpp
index 5d6fdde2b..d7df14af1 100644
--- a/src/utils/sdl2helper.cpp
+++ b/src/utils/sdl2helper.cpp
@@ -37,13 +37,12 @@ PRAGMA48(GCC diagnostic pop)
bool SDL::getAllVideoModes(StringVect &modeList)
{
std::set<std::string> modes;
-
- for (int display = 0; display < 100; display ++)
+ const int numDisplays = SDL_GetNumVideoDisplays();
+ for (int display = 0; display < numDisplays; display ++)
{
const int numModes = SDL_GetNumDisplayModes(display);
if (numModes > 0)
{
- logger->log("Modes for display %d", display);
for (int f = 0; f < numModes; f ++)
{
SDL_DisplayMode mode;