1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-02 00:42:33 +01:00
openrw/tests/test_Globals.cpp

14 lines
378 B
C++
Raw Normal View History

#include "test_Globals.hpp"
#include <RWConfig.hpp>
#if RW_TEST_WITH_DATA
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;
}
#endif