diff --git a/src/game_config.cc b/src/game_config.cc index dde349d..7063ec7 100644 --- a/src/game_config.cc +++ b/src/game_config.cc @@ -125,10 +125,26 @@ bool gameConfigInit(bool isMapper, int argc, char** argv) char* ch = strrchr(executable, '\\'); if (ch != NULL) { *ch = '\0'; - snprintf(gGameConfigFilePath, sizeof(gGameConfigFilePath), "%s\\%s", executable, GAME_CONFIG_FILE_NAME); + if (isMapper) { + snprintf(gGameConfigFilePath, + sizeof(gGameConfigFilePath), + "%s\\%s", + executable, + MAPPER_CONFIG_FILE_NAME); + } else { + snprintf(gGameConfigFilePath, + sizeof(gGameConfigFilePath), + "%s\\%s", + executable, + GAME_CONFIG_FILE_NAME); + } *ch = '\\'; } else { - strcpy(gGameConfigFilePath, GAME_CONFIG_FILE_NAME); + if (isMapper) { + strcpy(gGameConfigFilePath, MAPPER_CONFIG_FILE_NAME); + } else { + strcpy(gGameConfigFilePath, GAME_CONFIG_FILE_NAME); + } } // Read contents of `fallout2.cfg` into config. The values from the file diff --git a/src/game_config.h b/src/game_config.h index a444762..78a1299 100644 --- a/src/game_config.h +++ b/src/game_config.h @@ -5,8 +5,8 @@ namespace fallout { -// The file name of the main config file. #define GAME_CONFIG_FILE_NAME "fallout2.cfg" +#define MAPPER_CONFIG_FILE_NAME "mapper2.cfg" #define GAME_CONFIG_SYSTEM_KEY "system" #define GAME_CONFIG_PREFERENCES_KEY "preferences"