summaryrefslogtreecommitdiff
path: root/src/test/testmain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/testmain.cpp')
-rw-r--r--src/test/testmain.cpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/test/testmain.cpp b/src/test/testmain.cpp
index eb24a2c75..8ec48e6e2 100644
--- a/src/test/testmain.cpp
+++ b/src/test/testmain.cpp
@@ -78,9 +78,10 @@ int TestMain::exec()
{
initConfig();
int softwareTest = invokeSoftwareRenderTest("1");
- int fastOpenGLTest = invokeFastOpenGLRenderTest("2");
- int safeOpenGLTest = invokeSafeOpenGLRenderTest("3");
- int soundTest = invokeTest4();
+ int fastOpenGLTest = -1;
+ int safeOpenGLTest = -1;
+ int videoDetectTest = -1;
+ int soundTest = -1;
int rescaleTest[3];
int softFps = 0;
int fastOpenGLFps = 0;
@@ -88,11 +89,20 @@ int TestMain::exec()
int openGLMode = 0;
int maxFps = 0;
+ int detectMode = 0;
rescaleTest[0] = -1;
rescaleTest[1] = -1;
rescaleTest[2] = -1;
std::string info;
+ videoDetectTest = invokeTest("99");
+ if (!videoDetectTest)
+ detectMode = readValue(99);
+
+ fastOpenGLTest = invokeFastOpenGLRenderTest("2");
+ safeOpenGLTest = invokeSafeOpenGLRenderTest("3");
+ soundTest = invokeTest4();
+
info += strprintf("%d.%d,%d,%d.", soundTest, softwareTest,
fastOpenGLTest, safeOpenGLTest);
@@ -184,6 +194,10 @@ int TestMain::exec()
maxFps = safeOpenGLFps;
}
+ // if OpenGL implimentation is not good, disable it.
+ if (!detectMode)
+ openGLMode = 0;
+
writeConfig(openGLMode, rescaleTest[openGLMode], soundTest, info);
return 0;
}