diff --git a/input/input_autodetect.c b/input/input_autodetect.c index 846aa0bc85..2f14dabd96 100644 --- a/input/input_autodetect.c +++ b/input/input_autodetect.c @@ -26,6 +26,7 @@ #include "input_autodetect.h" #include "../configuration.h" +#include "../list_special.h" #include "../runloop.h" #include "../verbosity.h" @@ -216,11 +217,11 @@ static bool input_autoconfigure_joypad_from_conf_dir( settings->directory.autoconfig, settings->input.joypad_driver, sizeof(path)); - list = dir_list_new(path, "cfg", false, false); + list = dir_list_new_special(path, DIR_LIST_AUTOCONFIG, "cfg"); if (!list || !list->size) - list = dir_list_new(settings->directory.autoconfig, - "cfg", false, false); + list = dir_list_new_special(settings->directory.autoconfig, + DIR_LIST_AUTOCONFIG, "cfg"); if(!list) return false; diff --git a/list_special.c b/list_special.c index 1dbdde0abb..590ec9d871 100644 --- a/list_special.c +++ b/list_special.c @@ -62,6 +62,10 @@ struct string_list *dir_list_new_special(const char *input_dir, switch (type) { + case DIR_LIST_AUTOCONFIG: + dir = input_dir; + exts = filter; + break; case DIR_LIST_CORES: dir = settings->directory.libretro; diff --git a/list_special.h b/list_special.h index 64236eefd3..d4e3c288f0 100644 --- a/list_special.h +++ b/list_special.h @@ -30,7 +30,8 @@ enum dir_list_type DIR_LIST_DATABASES, DIR_LIST_COLLECTIONS, DIR_LIST_PLAIN, - DIR_LIST_SHADERS + DIR_LIST_SHADERS, + DIR_LIST_AUTOCONFIG }; enum string_list_type