1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-07-08 05:48:07 +02:00
openrw/tests/test_Globals.cpp
2021-10-12 21:53:56 +02:00

12 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;
}