Cleanup input_config_autoconfigure_joypad

This commit is contained in:
twinaphex 2016-05-06 04:50:02 +02:00
parent 1552975c1d
commit 72bc5e134a

View File

@ -311,32 +311,32 @@ static bool input_config_autoconfigure_joypad_init(autoconfig_params_t *params)
bool input_config_autoconfigure_joypad(autoconfig_params_t *params)
{
bool ret = false;
char msg[PATH_MAX_LENGTH];
if (!input_config_autoconfigure_joypad_init(params))
return ret;
goto error;
if (!*params->name)
return ret;
if (!ret)
ret = input_autoconfigure_joypad_from_conf_dir(params);
goto error;
if (input_autoconfigure_joypad_from_conf_dir(params))
goto success;
#if defined(HAVE_BUILTIN_AUTOCONFIG)
if (!ret)
ret = input_autoconfigure_joypad_from_conf_internal(params);
if (input_autoconfigure_joypad_from_conf_internal(params))
goto success;
#endif
if (!ret)
{
char msg[PATH_MAX_LENGTH];
RARCH_LOG("Autodetect: no profiles found for %s (%d/%d)\n",
params->name, params->vid, params->pid);
snprintf(msg, sizeof(msg), "%s (%ld/%ld) not configured",
params->name, (long)params->vid, (long)params->pid);
runloop_msg_queue_push(msg, 0, 60, false);
}
return ret;
RARCH_LOG("Autodetect: no profiles found for %s (%d/%d)\n",
params->name, params->vid, params->pid);
snprintf(msg, sizeof(msg), "%s (%ld/%ld) not configured",
params->name, (long)params->vid, (long)params->pid);
runloop_msg_queue_push(msg, 0, 60, false);
error:
return false;
success:
return true;
}
const struct retro_keybind *input_get_auto_bind(unsigned port, unsigned id)