This commit is contained in:
twinaphex 2016-06-11 21:51:28 +02:00
parent 8badf1787d
commit 7c904d47c2
3 changed files with 14 additions and 7 deletions

View File

@ -270,6 +270,15 @@ void fill_pathname_application_special(char *s, size_t len, enum application_spe
{
switch (type)
{
case APPLICATION_SPECIAL_DIRECTORY_AUTOCONFIG:
{
settings_t *settings = config_get_ptr();
fill_pathname_join(s,
settings->directory.autoconfig,
settings->input.joypad_driver,
len);
}
break;
case APPLICATION_SPECIAL_DIRECTORY_ASSETS_ZARCH_ICONS:
#ifdef HAVE_ZARCH
{

View File

@ -25,6 +25,7 @@
enum application_special_type
{
APPLICATION_SPECIAL_NONE = 0,
APPLICATION_SPECIAL_DIRECTORY_AUTOCONFIG,
APPLICATION_SPECIAL_DIRECTORY_ASSETS_MATERIALUI,
APPLICATION_SPECIAL_DIRECTORY_ASSETS_MATERIALUI_FONT,
APPLICATION_SPECIAL_DIRECTORY_ASSETS_MATERIALUI_ICONS,

View File

@ -26,6 +26,7 @@
#include "input_autodetect.h"
#include "../configuration.h"
#include "../file_path_special.h"
#include "../list_special.h"
#include "../runloop.h"
#include "../verbosity.h"
@ -213,19 +214,15 @@ static bool input_autoconfigure_joypad_from_conf_dir(
int current_best = 0;
config_file_t *conf = NULL;
struct string_list *list = NULL;
settings_t *settings = config_get_ptr();
if (!settings)
return false;
fill_pathname_application_special(path, sizeof(path),
APPLICATION_SPECIAL_DIRECTORY_AUTOCONFIG);
fill_pathname_join(path,
settings->directory.autoconfig,
settings->input.joypad_driver,
sizeof(path));
list = dir_list_new_special(path, DIR_LIST_AUTOCONFIG, "cfg");
if (!list || !list->size)
{
settings_t *settings = config_get_ptr();
if (list)
string_list_free(list);
list = dir_list_new_special(settings->directory.autoconfig,