mirror of
https://github.com/glest/glest-source.git
synced 2025-08-17 13:50:43 +02:00
- bugfix for datapath
This commit is contained in:
@@ -1317,6 +1317,8 @@ int setupGameItemPaths(int argc, char** argv, Config *config) {
|
|||||||
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;
|
||||||
|
Reference in New Issue
Block a user