From: Holger Schemel Date: Tue, 12 Sep 2017 17:39:16 +0000 (+0200) Subject: moved game controller base mappings file to new 'conf' sub-directory X-Git-Tag: 4.0.1.0~12 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=25c22434b11938e230719d6f73df4ed7813570be;p=rocksndiamonds.git moved game controller base mappings file to new 'conf' sub-directory --- diff --git a/src/libgame/misc.c b/src/libgame/misc.c index 8b37a47d..271a8dfb 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -985,6 +985,7 @@ void GetOptions(int argc, char *argv[], options.sounds_directory = getPath2(ro_base_path, SOUNDS_DIRECTORY); options.music_directory = getPath2(ro_base_path, MUSIC_DIRECTORY); options.docs_directory = getPath2(ro_base_path, DOCS_DIRECTORY); + options.conf_directory = getPath2(ro_base_path, CONF_DIRECTORY); options.execute_command = NULL; options.special_flags = NULL; @@ -1063,6 +1064,7 @@ void GetOptions(int argc, char *argv[], options.sounds_directory = getPath2(ro_base_path, SOUNDS_DIRECTORY); options.music_directory = getPath2(ro_base_path, MUSIC_DIRECTORY); options.docs_directory = getPath2(ro_base_path, DOCS_DIRECTORY); + options.conf_directory = getPath2(ro_base_path, CONF_DIRECTORY); } else if (strncmp(option, "-levels", option_len) == 0) { diff --git a/src/libgame/sdl.c b/src/libgame/sdl.c index 64b2e509..3afecaf9 100644 --- a/src/libgame/sdl.c +++ b/src/libgame/sdl.c @@ -2847,7 +2847,7 @@ void SDLInitJoysticks() static boolean sdl_joystick_subsystem_initialized = FALSE; boolean print_warning = !sdl_joystick_subsystem_initialized; #if defined(TARGET_SDL2) - char *mappings_file_base = getPath2(options.ro_base_directory, + char *mappings_file_base = getPath2(options.conf_directory, GAMECONTROLLER_BASENAME); char *mappings_file_user = getPath2(getUserGameDataDir(), GAMECONTROLLER_BASENAME); diff --git a/src/libgame/system.h b/src/libgame/system.h index e5c96d31..2f6c2809 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -498,6 +498,7 @@ #define SCORES_DIRECTORY "scores" #define DOCS_DIRECTORY "docs" #define CACHE_DIRECTORY "cache" +#define CONF_DIRECTORY "conf" #define GFX_CLASSIC_SUBDIR "gfx_classic" #define SND_CLASSIC_SUBDIR "snd_classic" @@ -800,6 +801,7 @@ struct OptionInfo char *sounds_directory; char *music_directory; char *docs_directory; + char *conf_directory; char *execute_command;