mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 12:40:23 +00:00
move more code out of retroarch.c
This commit is contained in:
parent
db3f0a8468
commit
1c546cb7fd
@ -2868,3 +2868,55 @@ bool dir_init_shader_internal(
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void get_current_menu_value(struct menu_state *menu_st,
|
||||||
|
char *s, size_t len)
|
||||||
|
{
|
||||||
|
menu_entry_t entry;
|
||||||
|
const char* entry_label;
|
||||||
|
|
||||||
|
MENU_ENTRY_INIT(entry);
|
||||||
|
entry.path_enabled = false;
|
||||||
|
entry.label_enabled = false;
|
||||||
|
entry.rich_label_enabled = false;
|
||||||
|
entry.sublabel_enabled = false;
|
||||||
|
menu_entry_get(&entry, 0, menu_st->selection_ptr, NULL, true);
|
||||||
|
|
||||||
|
if (entry.enum_idx == MENU_ENUM_LABEL_CHEEVOS_PASSWORD)
|
||||||
|
entry_label = entry.password_value;
|
||||||
|
else
|
||||||
|
entry_label = entry.value;
|
||||||
|
|
||||||
|
strlcpy(s, entry_label, len);
|
||||||
|
}
|
||||||
|
|
||||||
|
void get_current_menu_label(struct menu_state *menu_st,
|
||||||
|
char *s, size_t len)
|
||||||
|
{
|
||||||
|
menu_entry_t entry;
|
||||||
|
const char* entry_label;
|
||||||
|
|
||||||
|
MENU_ENTRY_INIT(entry);
|
||||||
|
menu_entry_get(&entry, 0, menu_st->selection_ptr, NULL, true);
|
||||||
|
|
||||||
|
if (!string_is_empty(entry.rich_label))
|
||||||
|
entry_label = entry.rich_label;
|
||||||
|
else
|
||||||
|
entry_label = entry.path;
|
||||||
|
|
||||||
|
strlcpy(s, entry_label, len);
|
||||||
|
}
|
||||||
|
|
||||||
|
void get_current_menu_sublabel(struct menu_state *menu_st,
|
||||||
|
char *s, size_t len)
|
||||||
|
{
|
||||||
|
menu_entry_t entry;
|
||||||
|
|
||||||
|
MENU_ENTRY_INIT(entry);
|
||||||
|
entry.path_enabled = false;
|
||||||
|
entry.label_enabled = false;
|
||||||
|
entry.rich_label_enabled = false;
|
||||||
|
entry.value_enabled = false;
|
||||||
|
menu_entry_get(&entry, 0, menu_st->selection_ptr, NULL, true);
|
||||||
|
strlcpy(s, entry.sublabel, len);
|
||||||
|
}
|
||||||
|
@ -772,6 +772,13 @@ void menu_entries_build_scroll_indices(
|
|||||||
struct menu_state *menu_st,
|
struct menu_state *menu_st,
|
||||||
file_list_t *list);
|
file_list_t *list);
|
||||||
|
|
||||||
|
void get_current_menu_value(struct menu_state *menu_st,
|
||||||
|
char *s, size_t len);
|
||||||
|
void get_current_menu_label(struct menu_state *menu_st,
|
||||||
|
char *s, size_t len);
|
||||||
|
void get_current_menu_sublabel(struct menu_state *menu_st,
|
||||||
|
char *s, size_t len);
|
||||||
|
|
||||||
void menu_display_common_image_upload(
|
void menu_display_common_image_upload(
|
||||||
const menu_ctx_driver_t *menu_driver_ctx,
|
const menu_ctx_driver_t *menu_driver_ctx,
|
||||||
void *menu_userdata,
|
void *menu_userdata,
|
||||||
|
54
retroarch.c
54
retroarch.c
@ -885,60 +885,6 @@ static bool menu_input_key_bind_iterate(
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_ACCESSIBILITY
|
|
||||||
static void get_current_menu_value(struct menu_state *menu_st,
|
|
||||||
char *s, size_t len)
|
|
||||||
{
|
|
||||||
menu_entry_t entry;
|
|
||||||
const char* entry_label;
|
|
||||||
|
|
||||||
MENU_ENTRY_INIT(entry);
|
|
||||||
entry.path_enabled = false;
|
|
||||||
entry.label_enabled = false;
|
|
||||||
entry.rich_label_enabled = false;
|
|
||||||
entry.sublabel_enabled = false;
|
|
||||||
menu_entry_get(&entry, 0, menu_st->selection_ptr, NULL, true);
|
|
||||||
|
|
||||||
if (entry.enum_idx == MENU_ENUM_LABEL_CHEEVOS_PASSWORD)
|
|
||||||
entry_label = entry.password_value;
|
|
||||||
else
|
|
||||||
entry_label = entry.value;
|
|
||||||
|
|
||||||
strlcpy(s, entry_label, len);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void get_current_menu_label(struct menu_state *menu_st,
|
|
||||||
char *s, size_t len)
|
|
||||||
{
|
|
||||||
menu_entry_t entry;
|
|
||||||
const char* entry_label;
|
|
||||||
|
|
||||||
MENU_ENTRY_INIT(entry);
|
|
||||||
menu_entry_get(&entry, 0, menu_st->selection_ptr, NULL, true);
|
|
||||||
|
|
||||||
if (!string_is_empty(entry.rich_label))
|
|
||||||
entry_label = entry.rich_label;
|
|
||||||
else
|
|
||||||
entry_label = entry.path;
|
|
||||||
|
|
||||||
strlcpy(s, entry_label, len);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void get_current_menu_sublabel(struct menu_state *menu_st,
|
|
||||||
char *s, size_t len)
|
|
||||||
{
|
|
||||||
menu_entry_t entry;
|
|
||||||
|
|
||||||
MENU_ENTRY_INIT(entry);
|
|
||||||
entry.path_enabled = false;
|
|
||||||
entry.label_enabled = false;
|
|
||||||
entry.rich_label_enabled = false;
|
|
||||||
entry.value_enabled = false;
|
|
||||||
menu_entry_get(&entry, 0, menu_st->selection_ptr, NULL, true);
|
|
||||||
strlcpy(s, entry.sublabel, len);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* menu_iterate:
|
* menu_iterate:
|
||||||
* @input : input sample for this frame
|
* @input : input sample for this frame
|
||||||
|
Loading…
x
Reference in New Issue
Block a user