1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-09-02 08:39:49 +02:00
openrw/tests/test_Globals.cpp
2019-01-21 20:31:31 +00:00

12 lines
349 B
C++

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