summaryrefslogtreecommitdiff
path: root/src/graphicsmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-05-18 01:57:27 +0300
committerAndrei Karas <akaras@inbox.ru>2012-05-19 00:31:16 +0300
commit804154afbee8843dde358837ec18ab7bfb785088 (patch)
treed0b58bea9b13e37dc44c7bf9487d3cde2a7991f6 /src/graphicsmanager.cpp
parentf35d6cd35d92ad16a55bf49f61f19153949497c0 (diff)
downloadmv-804154afbee8843dde358837ec18ab7bfb785088.tar.gz
mv-804154afbee8843dde358837ec18ab7bfb785088.tar.bz2
mv-804154afbee8843dde358837ec18ab7bfb785088.tar.xz
mv-804154afbee8843dde358837ec18ab7bfb785088.zip
Add button "detect best video mode" in video settings (windows only).
Diffstat (limited to 'src/graphicsmanager.cpp')
-rw-r--r--src/graphicsmanager.cpp11
1 files changed, 11 insertions, 0 deletions
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