From 26b7ccead9a500cdf50d13eb35bce2b6e2fa896a Mon Sep 17 00:00:00 2001 From: radius Date: Sun, 12 Jul 2015 13:45:17 -0500 Subject: [PATCH] add a display_name field if available so the user can know which autoconf was used --- input/input_autodetect.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/input/input_autodetect.c b/input/input_autodetect.c index ec4ebdcc75..2c3c567fe5 100644 --- a/input/input_autodetect.c +++ b/input/input_autodetect.c @@ -106,8 +106,11 @@ static void input_autoconfigure_joypad_add( autoconfig_params_t *params) { char msg[PATH_MAX_LENGTH] = {0}; + char buf[PATH_MAX_LENGTH] = {0}; settings_t *settings = config_get_ptr(); + config_get_array(conf, "input_display_name", buf, sizeof(buf)); + /* This will be the case if input driver is reinitialized. * No reason to spam autoconfigure messages every time. */ bool block_osd_spam = settings && @@ -120,8 +123,12 @@ static void input_autoconfigure_joypad_add( input_autoconfigure_joypad_conf(conf, settings->input.autoconf_binds[params->idx]); - snprintf(msg, sizeof(msg), "Device port #%u (%s) configured.", - params->idx, params->name); + if (buf[0] != '\0' || strcmp(buf, "")) + snprintf(msg, sizeof(msg), "Device %s in port #%u configured as %s", + params->name, params->idx, buf); + else + snprintf(msg, sizeof(msg), "Device %s in port #%u configured", + params->name, params->idx); if (!block_osd_spam) rarch_main_msg_queue_push(msg, 0, 60, false);