Merge pull request #10339 from jdgleaver/input-notification-port

Use correct port index in input device configured/disconnected notifications
This commit is contained in:
Autechre 2020-03-24 18:15:06 +01:00 committed by GitHub
commit 261adaf100
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -199,7 +199,7 @@ static void input_autoconfigure_joypad_add(config_file_t *conf,
snprintf(msg, sizeof(msg), "%s %s #%u.",
autoconfig_str,
msg_hash_to_str(MSG_DEVICE_CONFIGURED_IN_PORT),
params->idx);
params->idx + 1);
/* allow overriding the swap menu controls for player 1*/
if (params->idx == 0)
@ -425,7 +425,7 @@ bool input_autoconfigure_disconnect(unsigned i, const char *ident)
snprintf(msg, sizeof(msg), "%s #%u (%s).",
msg_hash_to_str(MSG_DEVICE_DISCONNECTED_FROM_PORT),
i, ident);
i + 1, ident);
state->msg = strdup(msg);