- bugfix for datapath
This commit is contained in:
parent
85319b30fc
commit
58faecb5d5
|
@ -1316,7 +1316,9 @@ int setupGameItemPaths(int argc, char** argv, Config *config) {
|
||||||
if(customPathValue != "") {
|
if(customPathValue != "") {
|
||||||
endPathWithSlash(customPathValue);
|
endPathWithSlash(customPathValue);
|
||||||
}
|
}
|
||||||
pathCache[GameConstants::path_data_CacheLookupKey]=customPathValue;
|
pathCache[GameConstants::path_data_CacheLookupKey] = customPathValue;
|
||||||
|
Properties::setApplicationDataPath(pathCache[GameConstants::path_data_CacheLookupKey]);
|
||||||
|
|
||||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Using custom data path [%s]\n",customPathValue.c_str());
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Using custom data path [%s]\n",customPathValue.c_str());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -1329,16 +1331,17 @@ int setupGameItemPaths(int argc, char** argv, Config *config) {
|
||||||
else if(config != NULL) {
|
else if(config != NULL) {
|
||||||
if(config->getString("DataPath","") != "") {
|
if(config->getString("DataPath","") != "") {
|
||||||
string customPathValue = config->getString("DataPath","");
|
string customPathValue = config->getString("DataPath","");
|
||||||
|
|
||||||
if(customPathValue != "") {
|
if(customPathValue != "") {
|
||||||
endPathWithSlash(customPathValue);
|
endPathWithSlash(customPathValue);
|
||||||
}
|
}
|
||||||
pathCache[GameConstants::path_data_CacheLookupKey] = config->getString("DataPath","");
|
pathCache[GameConstants::path_data_CacheLookupKey] = config->getString("DataPath","");
|
||||||
|
Properties::setApplicationDataPath(pathCache[GameConstants::path_data_CacheLookupKey]);
|
||||||
|
|
||||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Using ini specified data path [%s]\n",config->getString("DataPath","").c_str());
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Using ini specified data path [%s]\n",config->getString("DataPath","").c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Properties::setApplicationDataPath(pathCache[GameConstants::path_data_CacheLookupKey]);
|
|
||||||
|
|
||||||
//GAME_ARG_INI_PATH
|
//GAME_ARG_INI_PATH
|
||||||
if(hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_INI_PATH]) == true) {
|
if(hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_INI_PATH]) == true) {
|
||||||
int foundParamIndIndex = -1;
|
int foundParamIndIndex = -1;
|
||||||
|
|
Loading…
Reference in New Issue