diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-11 17:17:38 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-11 17:17:38 +0300 |
commit | 1a524dc9468fe532bc060a73ef736a68687aadca (patch) | |
tree | ab0450ce2d629d198e9e631198d176cd5e4961cf /src/gui | |
parent | ccdaf8cc6f61c322a2308123b03bb91f9ca68ee9 (diff) | |
download | manaverse-1a524dc9468fe532bc060a73ef736a68687aadca.tar.gz manaverse-1a524dc9468fe532bc060a73ef736a68687aadca.tar.bz2 manaverse-1a524dc9468fe532bc060a73ef736a68687aadca.tar.xz manaverse-1a524dc9468fe532bc060a73ef736a68687aadca.zip |
Fix windows software mode on the fly resize.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/setup_video.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp index 5250028d2..3bd6ab139 100644 --- a/src/gui/setup_video.cpp +++ b/src/gui/setup_video.cpp @@ -480,21 +480,29 @@ void Setup_Video::action(const gcn::ActionEvent &event) if (!width || !height) return; - // TODO: Find out why the drawing area doesn't resize without a restart. if (width != mainGraphics->mWidth || height != mainGraphics->mHeight) { #if defined(_WIN32) - if (width < mainGraphics->mWidth || height < mainGraphics->mHeight) + if (!config.getIntValue("opengl")) { - new OkDialog(_("Screen Resolution Changed"), - _("Restart your client for the change to take effect.") - + std::string("\n") + _("Some windows may be moved to " - "fit the lowered resolution.")); + Client::resize(width, height); } else { - new OkDialog(_("Screen Resolution Changed"), - _("Restart your client for the change to take effect.")); + if (width < mainGraphics->mWidth + || height < mainGraphics->mHeight) + { + new OkDialog(_("Screen Resolution Changed"), + _("Restart your client for the change to take effect.") + + std::string("\n") + _("Some windows may be moved to " + "fit the lowered resolution.")); + } + else + { + new OkDialog(_("Screen Resolution Changed"), + _("Restart your client for the change" + " to take effect.")); + } } #else Client::resize(width, height); |