From 840e969cadf36e17372da397eb758405150de6f8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 25 May 2014 21:24:46 +0300 Subject: Fix texture size detection and saving. --- src/graphicsmanager.cpp | 2 ++ src/gui/widgets/tabs/setup_video.cpp | 1 + src/test/testlauncher.cpp | 2 +- src/test/testmain.cpp | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp index 6af2e454c..f624ed850 100644 --- a/src/graphicsmanager.cpp +++ b/src/graphicsmanager.cpp @@ -990,6 +990,8 @@ void GraphicsManager::detectVideoSettings() if (val != -1) config.setValue("compresstextures", val); } + config.setValue("textureSize", conf.getValueInt("textureSize", 1024)); + config.setValue("testInfo", conf.getValue("testInfo", "")); delete test; } } diff --git a/src/gui/widgets/tabs/setup_video.cpp b/src/gui/widgets/tabs/setup_video.cpp index f33f410aa..439765260 100644 --- a/src/gui/widgets/tabs/setup_video.cpp +++ b/src/gui/widgets/tabs/setup_video.cpp @@ -455,6 +455,7 @@ void Setup_Video::action(const ActionEvent &event) } config.setValue("textureSize", conf.getValueInt("textureSize", 1024)); + config.setValue("testInfo", conf.getValue("testInfo", "")); delete test; } } diff --git a/src/test/testlauncher.cpp b/src/test/testlauncher.cpp index f2167af24..c3b424368 100644 --- a/src/test/testlauncher.cpp +++ b/src/test/testlauncher.cpp @@ -190,7 +190,7 @@ int TestLauncher::testTextures() int maxSize = 1024; int nextSize = 1024; int sz = OpenGLImageHelper::getTextureSize() + 1; - if (sz < 16500) + if (sz > 16500) sz = 16500; for (nextSize = 512; nextSize < sz; nextSize *= 2) diff --git a/src/test/testmain.cpp b/src/test/testmain.cpp index c42efc23e..4cc4966d8 100644 --- a/src/test/testmain.cpp +++ b/src/test/testmain.cpp @@ -206,6 +206,7 @@ int TestMain::exec(const bool testAudio) textureSize1 = readValue2(14); if (!invokeFastOpenBatchTest("15")) textureSize2 = readValue2(15); + info.append(strprintf(",%d,%d", textureSize1, textureSize2)); textureSize1 = std::min(textureSize1, textureSize2); if (textureSize1 < 1024) textureSize1 = 1024; -- cgit v1.2.3-60-g2f50