mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-22 19:14:50 +00:00
declare variables on top
This commit is contained in:
parent
9d268aba54
commit
cec1f3408f
@ -148,6 +148,9 @@ static bool input_autoconfigure_joypad_from_conf_dir(
|
||||
{
|
||||
size_t i;
|
||||
int ret = 0;
|
||||
int index = 0;
|
||||
int current_best = 0;
|
||||
|
||||
settings_t *settings = config_get_ptr();
|
||||
struct string_list *list = settings ? dir_list_new(
|
||||
settings->input.autoconfig_dir, "cfg", false) : NULL;
|
||||
@ -155,9 +158,6 @@ static bool input_autoconfigure_joypad_from_conf_dir(
|
||||
if (!list)
|
||||
return false;
|
||||
|
||||
int current_best = 0;
|
||||
int index = 0;
|
||||
|
||||
config_file_t *conf;
|
||||
|
||||
for (i = 0; i < list->size; i++)
|
||||
@ -172,9 +172,14 @@ static bool input_autoconfigure_joypad_from_conf_dir(
|
||||
config_file_free(conf);
|
||||
}
|
||||
|
||||
conf = config_file_new(list->elems[index].data);
|
||||
input_autoconfigure_joypad_add(conf, params);
|
||||
config_file_free(conf);
|
||||
if(index)
|
||||
{
|
||||
conf = config_file_new(list->elems[index].data);
|
||||
input_autoconfigure_joypad_add(conf, params);
|
||||
config_file_free(conf);
|
||||
}
|
||||
else
|
||||
ret = 0;
|
||||
|
||||
string_list_free(list);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user