mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 09:32:52 +00:00
Cleanup input_config_autoconfigure_joypad
This commit is contained in:
parent
1552975c1d
commit
72bc5e134a
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user