- added the ability to have platform specific main ini files for windows and linux for easier standalone mod packaging

This commit is contained in:
Mark Vejvoda 2011-10-04 20:41:33 +00:00
parent 3ed0f2f25a
commit f718cd25d0
1 changed files with 16 additions and 1 deletions

View File

@ -95,7 +95,22 @@ bool Config::tryCustomPath(std::pair<ConfigType,ConfigType> &type, std::pair<str
string linuxPath = custom_path;
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("-=-=-=-=-=-=-= looking for file in possible location [%s]\n",linuxPath.c_str());
if(fileExists(linuxPath + file.first) == true) {
#if defined(__linux__)
if(wasFound == false && fileExists(linuxPath + "linux_" + file.first) == true) {
file.first = linuxPath + "linux_" + file.first;
file.second = linuxPath + file.second;
wasFound = true;
}
#elif defined(__WINDOWS__)
if(wasFound == false && fileExists(linuxPath + "windows_" + file.first) == true) {
file.first = linuxPath + "windows_" + file.first;
file.second = linuxPath + file.second;
wasFound = true;
}
#endif
if(wasFound == false && fileExists(linuxPath + file.first) == true) {
file.first = linuxPath + file.first;
file.second = linuxPath + file.second;
wasFound = true;