diff options
Diffstat (limited to 'src/graphicsmanager.cpp')
-rw-r--r-- | src/graphicsmanager.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp index 552f5a018..0a7f78eb6 100644 --- a/src/graphicsmanager.cpp +++ b/src/graphicsmanager.cpp @@ -377,8 +377,19 @@ void GraphicsManager::setVideoMode() int height = config.getIntValue("screenheight"); #endif + int scale = 1; + if (mainGraphics->allowScale()) + { + if (!scale) + scale = 1; + scale = config.getIntValue("scale"); + if (width / scale < 470 || height / scale < 320) + scale = 1; + logger->log("set scale: %d", scale); + } + // Try to set the desired video mode - if (!mainGraphics->setVideoMode(width, height, bpp, + if (!mainGraphics->setVideoMode(width, height, scale, bpp, fullscreen, hwaccel, enableResize, noFrame)) { logger->log(strprintf("Couldn't set %dx%dx%d video mode: %s", @@ -396,7 +407,7 @@ void GraphicsManager::setVideoMode() config.setValueInt("screenwidth", oldWidth); config.setValueInt("screenheight", oldHeight); config.setValue("screen", oldFullscreen == 1); - if (!mainGraphics->setVideoMode(oldWidth, oldHeight, bpp, + if (!mainGraphics->setVideoMode(oldWidth, oldHeight, scale, bpp, oldFullscreen, hwaccel, enableResize, noFrame)) { logger->safeError(strprintf("Couldn't restore %dx%dx%d " |