Add sublabel

This commit is contained in:
twinaphex 2016-11-21 13:51:09 +01:00
parent b93c759d3c
commit 62e7103646
3 changed files with 22 additions and 2 deletions

View File

@ -2086,3 +2086,7 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_ALL_USERS_CONTROL_MENU,
"Allows any user to control the menu. If disabled, only User 1 can control the menu."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_AUDIO_VOLUME,
"Audio volume (in dB). 0 dB is normal volume, no gain applied."
)

View File

@ -523,6 +523,17 @@ static int action_bind_sublabel_input_all_users_control_menu(
return 0;
}
static int action_bind_sublabel_audio_volume(
file_list_t *list,
unsigned type, unsigned i,
const char *label, const char *path,
char *s, size_t len)
{
strlcpy(s, msg_hash_to_str(MENU_ENUM_SUBLABEL_AUDIO_VOLUME), len);
return 0;
}
int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
const char *path, const char *label, unsigned type, size_t idx)
{
@ -535,6 +546,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
{
switch (cbs->enum_idx)
{
case MENU_ENUM_LABEL_AUDIO_VOLUME:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_audio_volume);
break;
case MENU_ENUM_LABEL_INPUT_ALL_USERS_CONTROL_MENU:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_input_all_users_control_menu);
break;

View File

@ -1121,7 +1121,6 @@ enum msg_hash_enums
/* Audio */
MENU_ENUM_LABEL_AUDIO_ENABLE,
MENU_ENUM_LABEL_AUDIO_SYNC,
MENU_ENUM_LABEL_AUDIO_VOLUME,
MENU_ENUM_LABEL_AUDIO_MAX_TIMING_SKEW,
MENU_ENUM_LABEL_AUDIO_DEVICE,
MENU_ENUM_LABEL_AUDIO_BLOCK_FRAMES,
@ -1137,10 +1136,13 @@ enum msg_hash_enums
MENU_ENUM_LABEL_VALUE_AUDIO_BLOCK_FRAMES,
MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE,
MENU_ENUM_LABEL_VALUE_AUDIO_SYNC,
MENU_ENUM_LABEL_VALUE_AUDIO_VOLUME,
MENU_ENUM_LABEL_VALUE_AUDIO_MAX_TIMING_SKEW,
MENU_ENUM_LABEL_VALUE_AUDIO_DEVICE,
MENU_ENUM_LABEL_AUDIO_VOLUME,
MENU_ENUM_SUBLABEL_AUDIO_VOLUME,
MENU_ENUM_LABEL_VALUE_AUDIO_VOLUME,
MENU_ENUM_LABEL_AUDIO_RATE_CONTROL_DELTA,
MENU_ENUM_SUBLABEL_AUDIO_RATE_CONTROL_DELTA,
MENU_ENUM_LABEL_VALUE_AUDIO_RATE_CONTROL_DELTA,