mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-12 12:39:56 +00:00
make the first match work too
This commit is contained in:
parent
d21e9c002d
commit
63ce5ee4c0
@ -154,7 +154,7 @@ static bool input_autoconfigure_joypad_from_conf_dir(
|
||||
{
|
||||
size_t i;
|
||||
int ret = 0;
|
||||
int index = 0;
|
||||
int index = -1;
|
||||
int current_best = 0;
|
||||
config_file_t *conf = NULL;
|
||||
struct string_list *list = NULL;
|
||||
@ -187,7 +187,7 @@ static bool input_autoconfigure_joypad_from_conf_dir(
|
||||
{
|
||||
conf = config_file_new(list->elems[i].data);
|
||||
ret = input_try_autoconfigure_joypad_from_conf(conf, params);
|
||||
if(ret > current_best)
|
||||
if(ret >= current_best)
|
||||
{
|
||||
index = i;
|
||||
current_best = ret;
|
||||
@ -195,7 +195,7 @@ static bool input_autoconfigure_joypad_from_conf_dir(
|
||||
config_file_free(conf);
|
||||
}
|
||||
|
||||
if(index)
|
||||
if(index >= 0)
|
||||
{
|
||||
RARCH_LOG("Autoconf: best configuration score=%d\n", current_best);
|
||||
conf = config_file_new(list->elems[index].data);
|
||||
|
Loading…
x
Reference in New Issue
Block a user