diff options
-rw-r--r-- | src/graphicsmanager.cpp | 2 | ||||
-rw-r--r-- | src/graphicsmanager.h | 2 | ||||
-rw-r--r-- | src/test/testlauncher.cpp | 17 | ||||
-rw-r--r-- | src/test/testmain.cpp | 4 |
4 files changed, 16 insertions, 9 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp index 36ccdc045..eaab12e03 100644 --- a/src/graphicsmanager.cpp +++ b/src/graphicsmanager.cpp @@ -46,7 +46,7 @@ GraphicsManager::~GraphicsManager() { } -bool GraphicsManager::startDetection() +int GraphicsManager::startDetection() { #ifdef USE_OPENGL TestMain *test = new TestMain(); diff --git a/src/graphicsmanager.h b/src/graphicsmanager.h index 91af198a5..85fe5f548 100644 --- a/src/graphicsmanager.h +++ b/src/graphicsmanager.h @@ -35,7 +35,7 @@ class GraphicsManager void initGraphics(bool noOpenGL); - bool startDetection(); + int startDetection(); bool detectGraphics(); diff --git a/src/test/testlauncher.cpp b/src/test/testlauncher.cpp index 84caf5afd..59b98d754 100644 --- a/src/test/testlauncher.cpp +++ b/src/test/testlauncher.cpp @@ -125,15 +125,16 @@ int TestLauncher::testFps() Wallpaper::loadWallpapers(); Wallpaper::getWallpaper(800, 600); - Image *img[4]; + Image *img[5]; img[0] = Theme::getImageFromTheme("graphics/sprites/arrow_up.gif"); - img[1] = Theme::getImageFromTheme("graphics/sprites/arrow_down.gif"); - img[2] = Theme::getImageFromTheme("graphics/sprites/arrow_left.gif"); - img[3] = Theme::getImageFromTheme("graphics/sprites/arrow_right.gif"); + img[1] = Theme::getImageFromTheme("graphics/gui/target-cursor-normal-l.png"); + img[2] = Theme::getImageFromTheme("themes/wood/window.png"); + img[3] = Theme::getImageFromTheme("themes/pink/window.png"); + img[4] = Theme::getImageFromTheme("graphics/images/login_wallpaper.png"); int idx = 0; - int cnt = 500; + int cnt = 20; gettimeofday(&start, nullptr); for (int k = 0; k < cnt; k ++) @@ -144,7 +145,11 @@ int TestLauncher::testFps() { mainGraphics->drawImage(img[idx], x, y); idx ++; - if (idx > 3) + if (idx > 4) + idx = 0; + mainGraphics->drawImage(img[idx], x, y); + idx ++; + if (idx > 4) idx = 0; } } diff --git a/src/test/testmain.cpp b/src/test/testmain.cpp index 57c5ac45f..bdf071394 100644 --- a/src/test/testmain.cpp +++ b/src/test/testmain.cpp @@ -205,6 +205,8 @@ void TestMain::writeConfig(int openGLMode, int rescale, { mConfig.init(Client::getConfigDirectory() + "/config.xml"); + log->log("set mode to %d", openGLMode); + // searched values mConfig.setValue("opengl", openGLMode); mConfig.setValue("showBackground", !rescale); @@ -227,7 +229,7 @@ int TestMain::readValue2(int ver) { int def = readValue(ver, 0); log->log("value for %d = %d", ver, def); - return 0; + return def; } int TestMain::readValue(int ver, int def) |