Skip to content

Commit

Permalink
fix loading gemrb-<game>.ini options on non-Windows systems
Browse files Browse the repository at this point in the history
  • Loading branch information
fizzet committed May 17, 2015
1 parent 699c83f commit d7f7b15
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions gemrb/core/Interface.cpp
Expand Up @@ -1606,12 +1606,14 @@ int Interface::Init(InterfaceConfig* config)
char gemrbINI[_MAX_PATH] = { '\0' };
char tmp[_MAX_PATH] = { '\0' };
snprintf(gemrbINI, sizeof(gemrbINI), "gem-%s", INIConfig);
PathJoin(ini_path, GamePath, gemrbINI, NULL);
PathJoin(ini_path, SavePath, gemrbINI, NULL);
if (!file_exists(ini_path)) {
PathJoin(ini_path, GamePath, gemrbINI, NULL);
}
if (file_exists(ini_path)) {
strlcpy(tmp, INIConfig, sizeof(tmp));
strlcpy(INIConfig, gemrbINI, sizeof(INIConfig));
}
if (!IgnoreOriginalINI) {
} else if (!IgnoreOriginalINI) {
PathJoin( ini_path, GamePath, INIConfig, NULL );
Log(MESSAGE,"Core", "Loading original game options from %s", ini_path);
}
Expand Down

0 comments on commit d7f7b15

Please sign in to comment.