diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-05-18 01:57:27 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-05-19 00:31:16 +0300 |
commit | 804154afbee8843dde358837ec18ab7bfb785088 (patch) | |
tree | d0b58bea9b13e37dc44c7bf9487d3cde2a7991f6 /src/graphicsmanager.cpp | |
parent | f35d6cd35d92ad16a55bf49f61f19153949497c0 (diff) | |
download | manaplus-804154afbee8843dde358837ec18ab7bfb785088.tar.gz manaplus-804154afbee8843dde358837ec18ab7bfb785088.tar.bz2 manaplus-804154afbee8843dde358837ec18ab7bfb785088.tar.xz manaplus-804154afbee8843dde358837ec18ab7bfb785088.zip |
Add button "detect best video mode" in video settings (windows only).
Diffstat (limited to 'src/graphicsmanager.cpp')
-rw-r--r-- | src/graphicsmanager.cpp | 11 |
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 |