summaryrefslogtreecommitdiff
path: root/src/graphicsmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphicsmanager.cpp')
-rw-r--r--src/graphicsmanager.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp
index 8c2c9f9b2..f9df9570e 100644
--- a/src/graphicsmanager.cpp
+++ b/src/graphicsmanager.cpp
@@ -1030,8 +1030,13 @@ void GraphicsManager::detectPixelSize()
#endif
logger->log("screen size in pixels: %dx%d", mMaxWidth, mMaxHeight);
logger->log("screen size in millimeters: %dx%d", mWidthMM, mHeightMM);
- logger->log("screen density: \"%s\" = %d",
- getDensityString().c_str(), mDensity);
+ logger->log("actual screen density: " + getDensityString());
+ const int density = config.getIntValue("screenDensity");
+ if (density > 0 && density <= densitySize)
+ {
+ mDensity = density - 1;
+ logger->log("selected screen density: " + getDensityString());
+ }
}
std::string GraphicsManager::getDensityString() const