1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-10-06 09:07:19 +02:00
openrw/tests/test_Globals.cpp

12 lines
360 B
C++
Raw Normal View History

#include "test_Globals.hpp"
#include <RWConfig.hpp>
std::string Global::getGamePath() {
2019-01-03 12:59:57 +01:00
std::filesystem::path configPath = RWConfigParser::getDefaultConfigPath() / "openrw.ini";
RWConfigParser cfgParser;
auto [cfgLayer, parseResult] = cfgParser.loadFile(configPath);
BOOST_REQUIRE(parseResult.isValid());
return *cfgLayer.gamedataPath;
}