mirror of
https://github.com/libretro/RetroArch
synced 2025-04-18 14:42:30 +00:00
(input_autoconfigure_disconnect_handler) Simplify some code
This commit is contained in:
parent
b200ab6f8f
commit
87de6bda46
@ -776,15 +776,18 @@ static void input_autoconfigure_disconnect_handler(retro_task_t *task)
|
|||||||
goto task_finished;
|
goto task_finished;
|
||||||
|
|
||||||
/* Set task title */
|
/* Set task title */
|
||||||
if (!string_is_empty(autoconfig_handle->device_info.name))
|
|
||||||
snprintf(task_title, sizeof(task_title), "%s %u (%s)",
|
|
||||||
msg_hash_to_str(MSG_DEVICE_DISCONNECTED_FROM_PORT),
|
|
||||||
autoconfig_handle->port + 1,
|
|
||||||
autoconfig_handle->device_info.name);
|
|
||||||
else
|
|
||||||
snprintf(task_title, sizeof(task_title), "%s %u",
|
snprintf(task_title, sizeof(task_title), "%s %u",
|
||||||
msg_hash_to_str(MSG_DEVICE_DISCONNECTED_FROM_PORT),
|
msg_hash_to_str(MSG_DEVICE_DISCONNECTED_FROM_PORT),
|
||||||
autoconfig_handle->port + 1);
|
autoconfig_handle->port + 1);
|
||||||
|
if (!string_is_empty(autoconfig_handle->device_info.name))
|
||||||
|
{
|
||||||
|
size_t _len;
|
||||||
|
strlcat(task_title, " (", sizeof(task_title));
|
||||||
|
_len = strlcat(task_title, autoconfig_handle->device_info.name,
|
||||||
|
sizeof(task_title));
|
||||||
|
task_title[_len ] = ')';
|
||||||
|
task_title[_len+1] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
task_free_title(task);
|
task_free_title(task);
|
||||||
if (!autoconfig_handle->suppress_notifcations)
|
if (!autoconfig_handle->suppress_notifcations)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user