mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-02 09:42:37 +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;
|
size_t i;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
int index = 0;
|
||||||
|
int current_best = 0;
|
||||||
|
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
struct string_list *list = settings ? dir_list_new(
|
struct string_list *list = settings ? dir_list_new(
|
||||||
settings->input.autoconfig_dir, "cfg", false) : NULL;
|
settings->input.autoconfig_dir, "cfg", false) : NULL;
|
||||||
@ -155,9 +158,6 @@ static bool input_autoconfigure_joypad_from_conf_dir(
|
|||||||
if (!list)
|
if (!list)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
int current_best = 0;
|
|
||||||
int index = 0;
|
|
||||||
|
|
||||||
config_file_t *conf;
|
config_file_t *conf;
|
||||||
|
|
||||||
for (i = 0; i < list->size; i++)
|
for (i = 0; i < list->size; i++)
|
||||||
@ -172,9 +172,14 @@ static bool input_autoconfigure_joypad_from_conf_dir(
|
|||||||
config_file_free(conf);
|
config_file_free(conf);
|
||||||
}
|
}
|
||||||
|
|
||||||
conf = config_file_new(list->elems[index].data);
|
if(index)
|
||||||
input_autoconfigure_joypad_add(conf, params);
|
{
|
||||||
config_file_free(conf);
|
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);
|
string_list_free(list);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user