diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/render/graphics.cpp | 9 |
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(); |