diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-10-27 03:35:10 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-10-27 03:35:10 +0300 |
commit | 7ed530350226d268c3ccb80952f4176589e9a32a (patch) | |
tree | 05c4d030d2c872ae458fd2606ec116c1a636e8b2 /src/gui | |
parent | 10502e29937b67d5f2d62cf70804a4de76c5cf69 (diff) | |
download | manaplus-7ed530350226d268c3ccb80952f4176589e9a32a.tar.gz manaplus-7ed530350226d268c3ccb80952f4176589e9a32a.tar.bz2 manaplus-7ed530350226d268c3ccb80952f4176589e9a32a.tar.xz manaplus-7ed530350226d268c3ccb80952f4176589e9a32a.zip |
Autoselect resolution under android.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/setup_video.cpp | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp index 688519743..0188eb6b7 100644 --- a/src/gui/setup_video.cpp +++ b/src/gui/setup_video.cpp @@ -132,29 +132,7 @@ static bool modeSorter(std::string mode1, std::string mode2) ModeListModel::ModeListModel() { - /* Get available fullscreen/hardware modes */ - SDL_Rect **const modes = SDL_ListModes(nullptr, - SDL_FULLSCREEN | SDL_HWSURFACE); - - /* Check which modes are available */ - if (modes == static_cast<SDL_Rect **>(nullptr)) - { - logger->log1("No modes available"); - } - else if (modes == reinterpret_cast<SDL_Rect **>(-1)) - { - logger->log1("All resolutions available"); - } - else - { - for (int i = 0; modes[i]; ++ i) - { - const std::string modeString = - toString(static_cast<int>(modes[i]->w)) + "x" - + toString(static_cast<int>(modes[i]->h)); - mVideoModes.push_back(modeString); - } - } + graphicsManager.getAllVideoModes(mVideoModes); addCustomMode("640x480"); addCustomMode("800x600"); addCustomMode("1024x768"); |