diff options
Diffstat (limited to 'src/render/graphics.cpp')
-rw-r--r-- | src/render/graphics.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/render/graphics.cpp b/src/render/graphics.cpp index eff4df562..409626c09 100644 --- a/src/render/graphics.cpp +++ b/src/render/graphics.cpp @@ -136,8 +136,21 @@ void Graphics::setScale(int scale) { if (!scale) scale = 1; - if (mActualWidth / scale < 470 || mActualHeight / scale < 320) - scale = 1; + int scaleW = mActualWidth / scale; + int scaleH = mActualHeight / scale; + if (scaleW < 470) + { + scale = mActualWidth / 470; + if (scale < 1) + scale = 1; + scaleH = mActualHeight / scale; + } + if (scaleH < 320) + { + scale = mActualHeight / 320; + if (scale < 1) + scale = 1; + } logger->log("set scale: %d", scale); mScale = scale; mWidth = mActualWidth / mScale; |