summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-02-03 17:37:25 -0700
committerIra Rice <irarice@gmail.com>2009-02-03 17:37:25 -0700
commit12cd527f8e554547a0e56d1240c912918db880cb (patch)
treea081630f6a373d16383191dc2343383b5aebe1b1 /src
parentc6cf9a6a9c03f17362171aeed1a22244d99b7530 (diff)
downloadmana-12cd527f8e554547a0e56d1240c912918db880cb.tar.gz
mana-12cd527f8e554547a0e56d1240c912918db880cb.tar.bz2
mana-12cd527f8e554547a0e56d1240c912918db880cb.tar.xz
mana-12cd527f8e554547a0e56d1240c912918db880cb.zip
Modified video mode selection to not test the resolution clicked on, and
to trust that the resolutions presented are legal resolutions to try. This shouldn't be an issue, as the resolutions listed are pulled straight from SDL, and it avoids showing the user a visual artifact. Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/setup_video.cpp17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp
index 2ba8b6e8..faf72c68 100644
--- a/src/gui/setup_video.cpp
+++ b/src/gui/setup_video.cpp
@@ -393,23 +393,6 @@ void Setup_Video::action(const gcn::ActionEvent &event)
const std::string mode = mModeListModel->getElementAt(mModeList->getSelected());
const int width = atoi(mode.substr(0, mode.find("x")).c_str());
const int height = atoi(mode.substr(mode.find("x") + 1).c_str());
- const int bpp = 0;
- const bool fullscreen = ((int) config.getValue("screen", 0) == 1);
- const bool hwaccel = ((int) config.getValue("hwaccel", 0) == 1);
-
- // Try to set the desired video mode
- if (!graphics->setVideoMode(width, height, bpp, fullscreen, hwaccel))
- {
- std::cerr << _("Couldn't set ")
- << width << "x" << height << "x" << bpp << _(" video mode: ")
- << SDL_GetError() << std::endl;
- exit(1);
- }
-
- // Initialize for drawing
- graphics->_endDraw();
- graphics->_beginDraw();
- graphics->updateScreen();
// TODO: Find out why the drawing area doesn't resize without a restart.
new OkDialog(_("Screen resolution changed"),