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 && params->pid != 0
&& input_vid != 0 && input_vid != 0
&& input_pid != 0) && input_pid != 0)
{
score += 3; score += 3;
}
/* Check for name match */ /* Check for name match */
if (string_is_equal(ident, params->name)) if (string_is_equal(ident, params->name))
{
score += 2; score += 2;
}
else else
{ {
if (!string_is_empty(ident) if (!string_is_empty(ident)
&& !strncmp(params->name, ident, strlen(ident))) && !strncmp(params->name, ident, strlen(ident)))
{
score += 1; score += 1;
} }
}
return score; return score;
} }
@ -226,6 +221,7 @@ static bool input_autoconfigure_joypad_from_conf_dir(
{ {
conf = config_file_new(list->elems[i].data); 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) if(ret >= current_best)
{ {
index = i; index = i;