Add string representation label for cheatfiles

This commit is contained in:
twinaphex 2015-02-01 07:41:01 +01:00
parent bf02055971
commit f3688547db

View File

@ -4236,6 +4236,20 @@ static void menu_action_setting_disp_set_label_menu_file_cursor(
strlcpy(path_buf, path, path_buf_size);
}
static void menu_action_setting_disp_set_label_menu_file_cheat(
file_list_t* list,
unsigned *w, unsigned type, unsigned i,
const char *label,
char *type_str, size_t type_str_size,
const char *entry_label,
const char *path,
char *path_buf, size_t path_buf_size)
{
strlcpy(type_str, "(CHEAT)", type_str_size);
*w = strlen(type_str);
strlcpy(path_buf, path, path_buf_size);
}
static void menu_action_setting_disp_set_label(file_list_t* list,
unsigned *w, unsigned type, unsigned i,
const char *label,
@ -4822,6 +4836,10 @@ static void menu_entries_cbs_init_bind_get_string_representation(menu_file_list_
cbs->action_get_representation =
menu_action_setting_disp_set_label_menu_file_cursor;
break;
case MENU_FILE_CHEAT:
cbs->action_get_representation =
menu_action_setting_disp_set_label_menu_file_cheat;
break;
default:
cbs->action_get_representation = menu_action_setting_disp_set_label;
break;