openrw/tests/test_Globals.cpp
2021-10-12 21:53:56 +02:00

11 lines
360 B
C++

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