diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-07-16 21:10:58 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-07-16 21:27:20 +0300 |
commit | 71a8401df046ac856d3bb02d6f44733890883f44 (patch) | |
tree | e37e6c9b47ff4a9c45a41860286a78bd12f61616 /src/graphicsmanager.cpp | |
parent | a82331f46657298d335c36f9276ab3007b327d4b (diff) | |
download | mv-71a8401df046ac856d3bb02d6f44733890883f44.tar.gz mv-71a8401df046ac856d3bb02d6f44733890883f44.tar.bz2 mv-71a8401df046ac856d3bb02d6f44733890883f44.tar.xz mv-71a8401df046ac856d3bb02d6f44733890883f44.zip |
Add max texture size detection for all modes.
Diffstat (limited to 'src/graphicsmanager.cpp')
-rw-r--r-- | src/graphicsmanager.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp index 3e9701115..81296b1cb 100644 --- a/src/graphicsmanager.cpp +++ b/src/graphicsmanager.cpp @@ -485,6 +485,17 @@ void GraphicsManager::initGraphics() detectPixelSize(); setVideoMode(); } +#if !defined(ANDROID) && !defined(__APPLE__) + const std::string str = config.getStringValue("textureSize"); + std::vector<int> sizes; + splitToIntVector(sizes, str, ','); + const size_t pos = static_cast<size_t>(openGLMode); + if (sizes.size() <= pos) + settings.textureSize = 1024; + else + settings.textureSize = sizes[pos]; + logger->log("Detected max texture size: %d", settings.textureSize); +#endif // !defined(ANDROID) && !defined(__APPLE__) #endif } @@ -1271,7 +1282,8 @@ void GraphicsManager::detectVideoSettings() if (val != -1) config.setValue("compresstextures", val); } - config.setValue("textureSize", conf.getValueInt("textureSize", 1024)); + config.setValue("textureSize", conf.getValue("textureSize", + "1024,1024,1024")); config.setValue("testInfo", conf.getValue("testInfo", "")); delete test; } |