mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-01 16:32:31 +01:00
8b38fda984
- definition of arguments an configuration parameters is centralized in rwgame/RWConfig.inc - argument parsing is tested - the try/catch in main is less weird now (imho)
14 lines
378 B
C++
14 lines
378 B
C++
#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
|