From 12cd527f8e554547a0e56d1240c912918db880cb Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Tue, 3 Feb 2009 17:37:25 -0700 Subject: 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 --- src/gui/setup_video.cpp | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'src') 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"), -- cgit v1.2.3-70-g09d2