moved game controller base mappings file to new 'conf' sub-directory
authorHolger Schemel <info@artsoft.org>
Tue, 12 Sep 2017 17:39:16 +0000 (19:39 +0200)
committerHolger Schemel <info@artsoft.org>
Tue, 12 Sep 2017 17:39:16 +0000 (19:39 +0200)
src/libgame/misc.c
src/libgame/sdl.c
src/libgame/system.h

index 8b37a47de807dd6dd5ff36f478fe654a927afad9..271a8dfbb884946c0f3acfcba022b40d9ba0fa84 100644 (file)
@@ -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)
     {
index 64b2e5093f8e0640e51ca1c6171a5940f85e3428..3afecaf918c2e7bd991e3ec36e335cad334a65b3 100644 (file)
@@ -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);
index e5c96d316eb7b89aa1394a712d3199ba14a67ddd..2f6c2809fff688814c214e9030b4975d5e5e3f16 100644 (file)
 #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;