summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-01-29 00:55:06 +0300
committerAndrei Karas <akaras@inbox.ru>2014-01-29 00:55:06 +0300
commitdbc30204cae020ff0be41fb8f20bbb3a531686b3 (patch)
tree844ffa7b47c576ca93631020665a92af08603c25 /src/client.cpp
parentb9b358dc0d5c268a923c3a961ac8c072ccc691cf (diff)
downloadManaVerse-dbc30204cae020ff0be41fb8f20bbb3a531686b3.tar.gz
ManaVerse-dbc30204cae020ff0be41fb8f20bbb3a531686b3.tar.bz2
ManaVerse-dbc30204cae020ff0be41fb8f20bbb3a531686b3.tar.xz
ManaVerse-dbc30204cae020ff0be41fb8f20bbb3a531686b3.zip
allow apply scale without client restart.
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 82652e433..85384b29d 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -2892,6 +2892,17 @@ void Client::applyKeyRepeat()
#endif
}
+void Client::applyScale()
+{
+ const int scale = config.getIntValue("scale");
+ if (mainGraphics->getScale() == scale)
+ return;
+ mainGraphics->setScale(scale);
+ resizeVideo(mainGraphics->mActualWidth,
+ mainGraphics->mActualHeight,
+ true);
+}
+
void Client::setIsMinimized(const bool n)
{
mIsMinimized = n;