From 51374fd2d1e98edd8d6765c57947a058c11152f5 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 2 May 2018 20:21:20 +0200 Subject: [PATCH] Add better title for stream --- menu/cbs/menu_cbs_sublabel.c | 12 +++--------- menu/cbs/menu_cbs_title.c | 5 ++++- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index 019b04fba5..678b833f40 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -468,8 +468,7 @@ static int action_bind_sublabel_audio_mixer_stream( char *s, size_t len) { char msg[64]; - unsigned offset = (type - MENU_SETTINGS_AUDIO_MIXER_STREAM_BEGIN); - settings_t *settings = config_get_ptr(); + unsigned offset = (type - MENU_SETTINGS_AUDIO_MIXER_STREAM_BEGIN); audio_mixer_stream_t *stream = audio_driver_mixer_get_stream(offset); if (!stream) @@ -502,13 +501,8 @@ static int action_bind_sublabel_remap_sublabel( const char *label, const char *path, char *s, size_t len) { - unsigned offset; - settings_t *settings = config_get_ptr(); - - if (!settings) - return 0; - - offset = (type - MENU_SETTINGS_INPUT_DESC_BEGIN) / (RARCH_FIRST_CUSTOM_BIND + 8); + unsigned offset = (type - MENU_SETTINGS_INPUT_DESC_BEGIN) + / (RARCH_FIRST_CUSTOM_BIND + 8); snprintf(s, len, "User #%d: %s", offset + 1, input_config_get_device_display_name(offset) ? diff --git a/menu/cbs/menu_cbs_title.c b/menu/cbs/menu_cbs_title.c index f26b20263d..702d5d08b6 100644 --- a/menu/cbs/menu_cbs_title.c +++ b/menu/cbs/menu_cbs_title.c @@ -19,6 +19,8 @@ #include +#include "../../audio/audio_driver.h" + #include "../menu_driver.h" #include "../menu_cbs.h" @@ -79,7 +81,8 @@ static int action_get_title_action_generic(const char *path, const char *label, static int action_get_title_mixer_stream_actions(const char *path, const char *label, unsigned menu_type, char *s, size_t len) { unsigned offset = (menu_type - MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_BEGIN); - snprintf(s, len, "Mixer Stream #%d", offset + 1); + + snprintf(s, len, "Mixer Stream #%d: %s", offset + 1, audio_driver_mixer_get_stream_name(offset)); return 0; }