summaryrefslogtreecommitdiff
path: root/src/render
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-01-29 01:59:10 +0300
committerAndrei Karas <akaras@inbox.ru>2014-01-29 01:59:10 +0300
commitbbe6513b10f79ff25d04cd268c5224c3e84cc6ea (patch)
tree92302f74b33c00c8584e3479f1ea8d98011deeb6 /src/render
parent6aed2d7d4c6a3cb181f053ba52488cb1a0ea232c (diff)
downloadmanaplus-bbe6513b10f79ff25d04cd268c5224c3e84cc6ea.tar.gz
manaplus-bbe6513b10f79ff25d04cd268c5224c3e84cc6ea.tar.bz2
manaplus-bbe6513b10f79ff25d04cd268c5224c3e84cc6ea.tar.xz
manaplus-bbe6513b10f79ff25d04cd268c5224c3e84cc6ea.zip
fix on the fly scalle changing.
Diffstat (limited to 'src/render')
-rw-r--r--src/render/graphics.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/render/graphics.cpp b/src/render/graphics.cpp
index 82f44460b..c6237cf97 100644
--- a/src/render/graphics.cpp
+++ b/src/render/graphics.cpp
@@ -140,13 +140,15 @@ void Graphics::setScale(int scale)
scale = 1;
logger->log("set scale: %d", scale);
mScale = scale;
+ mWidth = mActualWidth / mScale;
+ mHeight = mActualHeight / mScale;
}
else
{
mScale = 1;
+ mWidth = mActualWidth;
+ mHeight = mActualHeight;
}
- mWidth = mActualWidth / mScale;
- mHeight = mActualHeight / mScale;
mRect.w = mWidth;
mRect.h = mHeight;
}
@@ -411,9 +413,6 @@ bool Graphics::setFullscreen(const bool fs)
bool Graphics::resizeScreen(const int width, const int height)
{
- if (mWidth == width && mHeight == height)
- return true;
-
#ifdef USE_SDL2
_endDraw();