From 46137db9170963393f003e6ae275f200942a83d8 Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Wed, 15 Apr 2009 10:53:43 -0600 Subject: Fixed displaying of the modes available under SDL so that it doesn't cut off the highest available resolution, as well as removing the warning about changing your resolution if it is your current resolution. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TODO: Find out why scrolling is broken for the modes dialog and fix it. Signed-off-by: Ira Rice Signed-off-by: Bjørn Lindeijer --- src/gui/setup_video.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/gui/setup_video.cpp') diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp index 4a5e06a4..41c4da76 100644 --- a/src/gui/setup_video.cpp +++ b/src/gui/setup_video.cpp @@ -162,11 +162,11 @@ Setup_Video::Setup_Video(): particleDetailLabel = new Label(_("Particle Detail")); mModeList->setEnabled(true); + #ifndef USE_OPENGL mOpenGLCheckBox->setEnabled(false); #endif - mModeList->setSelected(-1); mAlphaSlider->setValue(mOpacity); mAlphaSlider->setWidth(90); @@ -442,9 +442,12 @@ void Setup_Video::action(const gcn::ActionEvent &event) const int width = atoi(mode.substr(0, mode.find("x")).c_str()); const int height = atoi(mode.substr(mode.find("x") + 1).c_str()); - // TODO: Find out why the drawing area doesn't resize without a restart. - new OkDialog(_("Screen resolution changed"), - _("Restart your client for the change to take effect.")); + if (width != graphics->getWidth() || height != graphics->getHeight()) + { + // TODO: Find out why the drawing area doesn't resize without a restart. + new OkDialog(_("Screen resolution changed"), + _("Restart your client for the change to take effect.")); + } config.setValue("screenwidth", width); config.setValue("screenheight", height); -- cgit v1.2.3-70-g09d2