summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-01-30 17:03:58 +0300
committerAndrei Karas <akaras@inbox.ru>2012-01-30 19:53:08 +0300
commitc2351483dc7c918a592f2a1f52745c6552fb7d0c (patch)
tree3bea6a36d7133b32bb67b037aad115b7785e6550 /src/client.cpp
parent8e244c7e5b6c98b1a6e67d4e387a9c231a42b15c (diff)
downloadmanaplus-c2351483dc7c918a592f2a1f52745c6552fb7d0c.tar.gz
manaplus-c2351483dc7c918a592f2a1f52745c6552fb7d0c.tar.bz2
manaplus-c2351483dc7c918a592f2a1f52745c6552fb7d0c.tar.xz
manaplus-c2351483dc7c918a592f2a1f52745c6552fb7d0c.zip
Add option for enable/disable window resize.
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 2d4de8a9f..18318acb6 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -524,9 +524,11 @@ void Client::gameInit()
const int bpp = 0;
const bool fullscreen = config.getBoolValue("screen");
const bool hwaccel = config.getBoolValue("hwaccel");
+ const bool enableResize = config.getBoolValue("enableresize");
// Try to set the desired video mode
- if (!mainGraphics->setVideoMode(width, height, bpp, fullscreen, hwaccel))
+ if (!mainGraphics->setVideoMode(width, height, bpp,
+ fullscreen, hwaccel, enableResize))
{
logger->log(strprintf("Couldn't set %dx%dx%d video mode: %s",
width, height, bpp, SDL_GetError()));
@@ -544,7 +546,7 @@ void Client::gameInit()
config.setValueInt("screenheight", oldHeight);
config.setValue("screen", oldFullscreen);
if (!mainGraphics->setVideoMode(oldWidth, oldHeight, bpp,
- oldFullscreen, hwaccel))
+ oldFullscreen, hwaccel, enableResize))
{
logger->error(strprintf("Couldn't restore %dx%dx%d "
"video mode: %s", oldWidth, oldHeight, bpp,
@@ -2368,7 +2370,7 @@ void Client::resizeVideo(int width, int height)
if (mainGraphics->mWidth == width && mainGraphics->mHeight == height)
return;
- if (mainGraphics->resize(width, height))
+ if (mainGraphics->resizeScreen(width, height))
{
if (gui)
gui->videoResized();