- bugfix for datapath

This commit is contained in:
SoftCoder 2014-01-03 10:15:30 -08:00
parent 85319b30fc
commit 58faecb5d5
1 changed files with 6 additions and 3 deletions

View File

@ -1316,7 +1316,9 @@ int setupGameItemPaths(int argc, char** argv, Config *config) {
if(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());
}
else {
@ -1329,16 +1331,17 @@ int setupGameItemPaths(int argc, char** argv, Config *config) {
else if(config != NULL) {
if(config->getString("DataPath","") != "") {
string customPathValue = config->getString("DataPath","");
if(customPathValue != "") {
endPathWithSlash(customPathValue);
}
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());
}
}
Properties::setApplicationDataPath(pathCache[GameConstants::path_data_CacheLookupKey]);
//GAME_ARG_INI_PATH
if(hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_INI_PATH]) == true) {
int foundParamIndIndex = -1;