summaryrefslogtreecommitdiff
path: root/src/test/testmain.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-29 12:56:16 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-29 12:56:16 +0300
commit1b500cb24655e2ad3e6c6fd20143ce0d2d070d6f (patch)
tree3eea380919dae735fdbeacff314edf1ad06d26ab /src/test/testmain.cpp
parent0b7ef18ac3c7fb4e3717f6311d4e21a31ff440d5 (diff)
downloadmanaplus-1b500cb24655e2ad3e6c6fd20143ce0d2d070d6f.tar.gz
manaplus-1b500cb24655e2ad3e6c6fd20143ce0d2d070d6f.tar.bz2
manaplus-1b500cb24655e2ad3e6c6fd20143ce0d2d070d6f.tar.xz
manaplus-1b500cb24655e2ad3e6c6fd20143ce0d2d070d6f.zip
Move many variables from client into settings.
Diffstat (limited to 'src/test/testmain.cpp')
-rw-r--r--src/test/testmain.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/testmain.cpp b/src/test/testmain.cpp
index 894d40537..16d36dd35 100644
--- a/src/test/testmain.cpp
+++ b/src/test/testmain.cpp
@@ -24,6 +24,7 @@
#ifdef USE_OPENGL
#include "client.h"
+#include "settings.h"
#include "utils/delete2.h"
#include "utils/paths.h"
@@ -41,8 +42,7 @@ TestMain::TestMain() :
mConfig()
{
fileName = getSelfName();
- log->setLogFile(client->getLocalDataDirectory()
- + std::string("/manaplustest.log"));
+ log->setLogFile(settings.localDataDir + std::string("/manaplustest.log"));
}
TestMain::~TestMain()
@@ -52,7 +52,7 @@ TestMain::~TestMain()
void TestMain::initConfig()
{
- mConfig.init(client->getConfigDirectory() + "/test.xml");
+ mConfig.init(settings.configDir + "/test.xml");
// mConfig.setDefaultValues(getConfigDefaults());
mConfig.setValue("hwaccel", false);
@@ -246,7 +246,7 @@ void TestMain::writeConfig(const RenderType openGLMode,
const int textureSize,
const int detectMode)
{
- mConfig.init(client->getConfigDirectory() + "/config.xml");
+ mConfig.init(settings.configDir + "/config.xml");
log->log("set mode to %d", static_cast<int>(openGLMode));
@@ -290,8 +290,8 @@ int TestMain::readValue(const int ver, int def)
std::string tmp;
int var;
std::ifstream file;
- file.open((client->getLocalDataDirectory()
- + std::string("/test.log")).c_str(), std::ios::in);
+ file.open((settings.localDataDir + std::string("/test.log")).c_str(),
+ std::ios::in);
if (!getline(file, tmp))
{
file.close();