diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-09-06 23:53:50 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-09-07 01:56:53 +0300 |
commit | bfe9b1eeb587254d92c3ebb338b50ce1e7dfac79 (patch) | |
tree | 48114321787b15030ae193d713b2ad80d634c852 | |
parent | c7cc189b3007321b09c0c49de74baeef5b18606a (diff) | |
download | plus-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.cpp | 5 |
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; |