diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-05-01 17:05:28 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-05-01 17:27:14 +0300 |
commit | 4ecea7806d45ca40b370b13da6fe4781ef04367d (patch) | |
tree | 22eef831511daf36cc0bd7e497fae972e0371735 /src/graphicsmanager.cpp | |
parent | 40efe9ac2ad7b080f3b817b7fc909fcc2b333093 (diff) | |
download | mv-4ecea7806d45ca40b370b13da6fe4781ef04367d.tar.gz mv-4ecea7806d45ca40b370b13da6fe4781ef04367d.tar.bz2 mv-4ecea7806d45ca40b370b13da6fe4781ef04367d.tar.xz mv-4ecea7806d45ca40b370b13da6fe4781ef04367d.zip |
add option to override detected screen density.
Diffstat (limited to 'src/graphicsmanager.cpp')
-rw-r--r-- | src/graphicsmanager.cpp | 9 |
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 |