mirror of
https://github.com/libretro/RetroArch
synced 2025-02-07 12:39:54 +00:00
Add dropdown lists for thumbnails
This commit is contained in:
parent
69fbbfb284
commit
51d3ddff6a
@ -810,89 +810,6 @@ static void menu_action_setting_disp_set_label_wifi_is_online(
|
||||
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ONLINE), len);
|
||||
}
|
||||
|
||||
static void menu_action_setting_disp_set_label_thumbnails(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *s2, size_t len2)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!settings)
|
||||
return;
|
||||
|
||||
strlcpy(s2, path, len2);
|
||||
*w = 19;
|
||||
|
||||
switch (settings->uints.menu_thumbnails)
|
||||
{
|
||||
case 0:
|
||||
strlcpy(s, msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_OFF), len);
|
||||
break;
|
||||
case 1:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_SCREENSHOTS), len);
|
||||
break;
|
||||
case 2:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_TITLE_SCREENS), len);
|
||||
break;
|
||||
case 3:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_BOXARTS), len);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void menu_action_setting_disp_set_label_left_thumbnails(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *s2, size_t len2)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!settings)
|
||||
return;
|
||||
|
||||
strlcpy(s2, path, len2);
|
||||
*w = 19;
|
||||
|
||||
switch (settings->uints.menu_left_thumbnails)
|
||||
{
|
||||
case 0:
|
||||
strlcpy(s, msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_OFF), len);
|
||||
break;
|
||||
case 1:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_SCREENSHOTS), len);
|
||||
break;
|
||||
case 2:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_TITLE_SCREENS), len);
|
||||
break;
|
||||
case 3:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_BOXARTS), len);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void menu_action_setting_disp_set_label_menu_disk_index(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
@ -1535,14 +1452,6 @@ static int menu_cbs_init_bind_get_string_representation_compare_label(
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_wifi_is_online);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_THUMBNAILS:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_thumbnails);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_LEFT_THUMBNAILS:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_left_thumbnails);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CHEAT_NUM_PASSES:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_cheat_num_passes);
|
||||
|
@ -190,6 +190,68 @@ static void setting_get_string_representation_cheevos_password(void *data,
|
||||
}
|
||||
#endif
|
||||
|
||||
static void setting_get_string_representation_uint_menu_thumbnails(void *data,
|
||||
char *s, size_t len)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
if (!setting)
|
||||
return;
|
||||
|
||||
switch (*setting->value.target.unsigned_integer)
|
||||
{
|
||||
case 0:
|
||||
strlcpy(s, msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_OFF), len);
|
||||
break;
|
||||
case 1:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_SCREENSHOTS), len);
|
||||
break;
|
||||
case 2:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_TITLE_SCREENS), len);
|
||||
break;
|
||||
case 3:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_BOXARTS), len);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void setting_get_string_representation_uint_menu_left_thumbnails(void *data,
|
||||
char *s, size_t len)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
if (!setting)
|
||||
return;
|
||||
|
||||
switch (*setting->value.target.unsigned_integer)
|
||||
{
|
||||
case 0:
|
||||
strlcpy(s, msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_OFF), len);
|
||||
break;
|
||||
case 1:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_SCREENSHOTS), len);
|
||||
break;
|
||||
case 2:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_TITLE_SCREENS), len);
|
||||
break;
|
||||
case 3:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_BOXARTS), len);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void setting_get_string_representation_uint_xmb_icon_theme(void *data,
|
||||
char *s, size_t len)
|
||||
{
|
||||
@ -7399,6 +7461,9 @@ static bool setting_append_list(
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint;
|
||||
(*list)[list_info->index - 1].get_string_representation =
|
||||
&setting_get_string_representation_uint_menu_thumbnails;
|
||||
menu_settings_list_current_add_range(list, list_info, 0, 3, 1, true, true);
|
||||
|
||||
CONFIG_UINT(
|
||||
@ -7412,6 +7477,9 @@ static bool setting_append_list(
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint;
|
||||
(*list)[list_info->index - 1].get_string_representation =
|
||||
&setting_get_string_representation_uint_menu_left_thumbnails;
|
||||
menu_settings_list_current_add_range(list, list_info, 0, 3, 1, true, true);
|
||||
|
||||
CONFIG_BOOL(
|
||||
|
Loading…
x
Reference in New Issue
Block a user