From f35d6cd35d92ad16a55bf49f61f19153949497c0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 11 May 2012 21:55:28 +0300 Subject: Improve auto detection for best graphics mode. --- src/test/testlauncher.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/test/testlauncher.cpp') diff --git a/src/test/testlauncher.cpp b/src/test/testlauncher.cpp index 6818c0b3c..b3fa729a0 100644 --- a/src/test/testlauncher.cpp +++ b/src/test/testlauncher.cpp @@ -23,6 +23,7 @@ #include "client.h" #include "configuration.h" #include "graphics.h" +#include "graphicsmanager.h" #include "localconsts.h" #include "logger.h" #include "sound.h" @@ -69,6 +70,8 @@ int TestLauncher::exec() return testRescale(); else if (mTest == "8" || mTest == "9" || mTest == "10") return testFps(); + else if (mTest == "99") + return testVideoDetection(); else if (mTest == "100") return testInternal(); @@ -207,6 +210,13 @@ int TestLauncher::testInternal() return 0; } +int TestLauncher::testVideoDetection() +{ + graphicsManager.detectGraphics(); + file << mTest << std::endl; + file << config.getIntValue("opengl") << std::endl; +} + int TestLauncher::calcFps(timeval *start, timeval *end, int calls) { long mtime; -- cgit v1.2.3-70-g09d2