mirror of
https://github.com/rwengine/openrw.git
synced 2024-09-02 16:49:46 +02:00
- 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
|