Add sublabels

This commit is contained in:
twinaphex 2016-10-21 01:05:47 +02:00
parent 3a6f9c4967
commit 323ea2fa83
3 changed files with 32 additions and 0 deletions

View File

@ -3023,6 +3023,10 @@ const char *msg_hash_to_str_us(enum msg_hash_enums msg)
switch (msg)
{
case MENU_ENUM_SUBLABEL_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO:
return "Gamepad button combination to toggle menu.";
case MENU_ENUM_SUBLABEL_CPU_CORES:
return "Amount of cores that the CPU has.";
case MENU_ENUM_SUBLABEL_VIDEO_BLACK_FRAME_INSERTION:
return "Inserts a black frame inbetween frames. Useful for users of 120 Hz monitors who want to play 60 Hz material with eliminated ghosting.";
case MENU_ENUM_SUBLABEL_VIDEO_FRAME_DELAY:

View File

@ -160,6 +160,26 @@ static int action_bind_sublabel_video_black_frame_insertion(
return 0;
}
static int action_bind_sublabel_systeminfo_cpu_cores(
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_CPU_CORES), len);
return 0;
}
static int action_bind_sublabel_toggle_gamepad_combo(
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_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO), 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)
{
@ -172,6 +192,12 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
{
switch (cbs->enum_idx)
{
case MENU_ENUM_LABEL_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_toggle_gamepad_combo);
break;
case MENU_ENUM_LABEL_CPU_CORES:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_systeminfo_cpu_cores);
break;
case MENU_ENUM_LABEL_VIDEO_BLACK_FRAME_INSERTION:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_black_frame_insertion);
break;

View File

@ -1865,6 +1865,8 @@ enum msg_hash_enums
MENU_ENUM_LABEL_CB_CORE_UPDATER_DOWNLOAD,
MENU_ENUM_LABEL_CB_CORE_THUMBNAILS_DOWNLOAD,
MENU_ENUM_SUBLABEL_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO,
MENU_ENUM_SUBLABEL_CPU_CORES,
MENU_ENUM_SUBLABEL_VIDEO_BLACK_FRAME_INSERTION,
MENU_ENUM_SUBLABEL_VIDEO_FRAME_DELAY,
MENU_ENUM_SUBLABEL_ADD_CONTENT_LIST,