This commit is contained in:
twinaphex 2016-09-12 18:39:46 +02:00
parent d2dbe63b2b
commit 3247de9afa
2 changed files with 4 additions and 8 deletions

View File

@ -103,23 +103,18 @@ static int input_try_autoconfigure_joypad_from_conf(config_file_t *conf,
&& params->pid != 0
&& input_vid != 0
&& input_pid != 0)
{
score += 3;
}
/* Check for name match */
if (string_is_equal(ident, params->name))
{
score += 2;
}
else
{
if (!string_is_empty(ident)
&& !strncmp(params->name, ident, strlen(ident)))
{
score += 1;
}
}
return score;
}
@ -225,7 +220,8 @@ static bool input_autoconfigure_joypad_from_conf_dir(
for (i = 0; i < list->size; i++)
{
conf = config_file_new(list->elems[i].data);
ret = input_try_autoconfigure_joypad_from_conf(conf, params);
ret = input_try_autoconfigure_joypad_from_conf(conf, params);
if(ret >= current_best)
{
index = i;

View File

@ -99,7 +99,7 @@ struct turbo_buttons
static turbo_buttons_t input_driver_turbo_btns;
#ifdef HAVE_COMMAND
static command_t *input_driver_command = NULL;
static command_t *input_driver_command = NULL;
#endif
#ifdef HAVE_NETWORKGAMEPAD
static input_remote_t *input_driver_remote = NULL;