summaryrefslogtreecommitdiff
path: root/src/gui/setup_video.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-27 03:35:10 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-27 03:35:10 +0300
commit7ed530350226d268c3ccb80952f4176589e9a32a (patch)
tree05c4d030d2c872ae458fd2606ec116c1a636e8b2 /src/gui/setup_video.cpp
parent10502e29937b67d5f2d62cf70804a4de76c5cf69 (diff)
downloadmanaverse-7ed530350226d268c3ccb80952f4176589e9a32a.tar.gz
manaverse-7ed530350226d268c3ccb80952f4176589e9a32a.tar.bz2
manaverse-7ed530350226d268c3ccb80952f4176589e9a32a.tar.xz
manaverse-7ed530350226d268c3ccb80952f4176589e9a32a.zip
Autoselect resolution under android.
Diffstat (limited to 'src/gui/setup_video.cpp')
-rw-r--r--src/gui/setup_video.cpp24
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");