From 804154afbee8843dde358837ec18ab7bfb785088 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 18 May 2012 01:57:27 +0300 Subject: Add button "detect best video mode" in video settings (windows only). --- src/graphicsmanager.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/graphicsmanager.cpp') diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp index 68a2ac48d..e9360d88c 100644 --- a/src/graphicsmanager.cpp +++ b/src/graphicsmanager.cpp @@ -20,6 +20,7 @@ #include "graphicsmanager.h" +#include "client.h" #include "configuration.h" #include "graphics.h" #include "graphicsvertexes.h" @@ -31,6 +32,8 @@ #include "utils/process.h" #include "utils/stringutils.h" +#include "test/testmain.h" + #include "debug.h" GraphicsManager graphicsManager; @@ -43,6 +46,14 @@ GraphicsManager::~GraphicsManager() { } +bool GraphicsManager::startDetection() +{ + std::string fileName = getSelfName(); + TestMain *test = new TestMain(); + test->exec(false); + return test->getConfig().getValueInt("opengl", -1); +} + bool GraphicsManager::detectGraphics() { #ifdef USE_OPENGL -- cgit v1.2.3-70-g09d2