From 2e210b6bb4d4ea512dbc3903c68a25255dc98303 Mon Sep 17 00:00:00 2001 From: radius Date: Fri, 12 Jan 2018 10:29:35 -0500 Subject: [PATCH] fix my last PR for builtin autoconfs --- tasks/task_autodetect.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tasks/task_autodetect.c b/tasks/task_autodetect.c index 779f4cab87..c0753434c1 100644 --- a/tasks/task_autodetect.c +++ b/tasks/task_autodetect.c @@ -275,8 +275,14 @@ static void input_autoconfigure_joypad_add(config_file_t *conf, task_set_title(task, strdup(msg)); } } - input_config_set_device_display_name(params->idx, display_name); - input_config_set_device_config_name(params->idx, path_basename(conf->path)); + if (!string_is_empty(display_name)) + input_config_set_device_display_name(params->idx, display_name); + else + input_config_set_device_display_name(params->idx, "N/A"); + if (!string_is_empty(conf->path)) + input_config_set_device_config_name(params->idx, path_basename(conf->path)); + else + input_config_set_device_config_name(params->idx, "N/A"); input_autoconfigure_joypad_reindex_devices();