(input_autodetect.c) Use dir_list_new_special

This commit is contained in:
twinaphex 2016-05-21 13:31:41 +02:00
parent 57f797dad6
commit 6c840cdd59
3 changed files with 10 additions and 4 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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