summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-11 17:17:38 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-11 17:17:38 +0300
commit1a524dc9468fe532bc060a73ef736a68687aadca (patch)
treeab0450ce2d629d198e9e631198d176cd5e4961cf
parentccdaf8cc6f61c322a2308123b03bb91f9ca68ee9 (diff)
downloadmv-1a524dc9468fe532bc060a73ef736a68687aadca.tar.gz
mv-1a524dc9468fe532bc060a73ef736a68687aadca.tar.bz2
mv-1a524dc9468fe532bc060a73ef736a68687aadca.tar.xz
mv-1a524dc9468fe532bc060a73ef736a68687aadca.zip
Fix windows software mode on the fly resize.
-rw-r--r--src/gui/setup_video.cpp24
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);