summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-04-15 10:53:43 -0600
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-04-20 19:54:16 +0200
commit46137db9170963393f003e6ae275f200942a83d8 (patch)
tree473815e8a67cb5efb3607bbd3c96fe1b7d271823 /src/gui
parentf1d6803dd8a90db885d4d7c1734783acdcd95485 (diff)
downloadmana-46137db9170963393f003e6ae275f200942a83d8.tar.gz
mana-46137db9170963393f003e6ae275f200942a83d8.tar.bz2
mana-46137db9170963393f003e6ae275f200942a83d8.tar.xz
mana-46137db9170963393f003e6ae275f200942a83d8.zip
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. TODO: Find out why scrolling is broken for the modes dialog and fix it. Signed-off-by: Ira Rice <irarice@gmail.com> Signed-off-by: Bjørn Lindeijer <bjorn@lindeijer.nl>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/setup_video.cpp11
1 files changed, 7 insertions, 4 deletions
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);