mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-21 10:20:21 +00:00
(input_autodetect.c ) Cleanups pt. 4
This commit is contained in:
parent
c5ece757d8
commit
bf0693fcb0
@ -86,6 +86,9 @@ static void input_autoconfigure_joypad_add(
|
||||
{
|
||||
char msg[PATH_MAX_LENGTH];
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
/* This will be the case if input driver is reinitialized.
|
||||
* No reason to spam autoconfigure messages every time. */
|
||||
bool block_osd_spam = settings &&
|
||||
settings->input.autoconfigured[params->idx] && params->name;
|
||||
|
||||
@ -133,9 +136,6 @@ void input_config_autoconfigure_joypad(autoconfig_params_t *params)
|
||||
if (!settings || !settings->input.autodetect_enable)
|
||||
return;
|
||||
|
||||
/* This will be the case if input driver is reinitialized.
|
||||
* No reason to spam autoconfigure messages every time. */
|
||||
|
||||
for (i = 0; i < RARCH_BIND_LIST_END; i++)
|
||||
{
|
||||
settings->input.autoconf_binds[params->idx][i].joykey = NO_BTN;
|
||||
@ -184,7 +184,10 @@ void input_config_autoconfigure_joypad(autoconfig_params_t *params)
|
||||
const struct retro_keybind *input_get_auto_bind(unsigned port, unsigned id)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
unsigned joy_idx = settings->input.joypad_map[port];
|
||||
unsigned joy_idx = 0;
|
||||
|
||||
if (settings)
|
||||
joy_idx = settings->input.joypad_map[port];
|
||||
|
||||
if (joy_idx < MAX_USERS)
|
||||
return &settings->input.autoconf_binds[joy_idx][id];
|
||||
|
Loading…
Reference in New Issue
Block a user