From 6c840cdd59cea992409cc6126e1b9233153b787c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 21 May 2016 13:31:41 +0200 Subject: [PATCH] (input_autodetect.c) Use dir_list_new_special --- input/input_autodetect.c | 7 ++++--- list_special.c | 4 ++++ list_special.h | 3 ++- 3 files changed, 10 insertions(+), 4 deletions(-) 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