summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-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);