From 7ed530350226d268c3ccb80952f4176589e9a32a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 27 Oct 2012 03:35:10 +0300 Subject: Autoselect resolution under android. --- src/gui/setup_video.cpp | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'src/gui') 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(nullptr)) - { - logger->log1("No modes available"); - } - else if (modes == reinterpret_cast(-1)) - { - logger->log1("All resolutions available"); - } - else - { - for (int i = 0; modes[i]; ++ i) - { - const std::string modeString = - toString(static_cast(modes[i]->w)) + "x" - + toString(static_cast(modes[i]->h)); - mVideoModes.push_back(modeString); - } - } + graphicsManager.getAllVideoModes(mVideoModes); addCustomMode("640x480"); addCustomMode("800x600"); addCustomMode("1024x768"); -- cgit v1.2.3-70-g09d2