mirror of
https://github.com/libretro/RetroArch
synced 2025-02-10 03:39:56 +00:00
Rename some functions
This commit is contained in:
parent
69b95728bf
commit
b7625289f7
@ -147,7 +147,7 @@ static int action_left_mainmenu(unsigned type, const char *label,
|
|||||||
|
|
||||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection);
|
menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection);
|
||||||
|
|
||||||
cbs = menu_list_get_actiondata_at_offset(selection_buf,
|
cbs = menu_entries_get_actiondata_at_offset(selection_buf,
|
||||||
selection);
|
selection);
|
||||||
|
|
||||||
switch (push_list)
|
switch (push_list)
|
||||||
|
@ -172,7 +172,7 @@ static int action_right_mainmenu(unsigned type, const char *label,
|
|||||||
|
|
||||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection);
|
menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection);
|
||||||
|
|
||||||
cbs = menu_list_get_actiondata_at_offset(selection_buf, selection);
|
cbs = menu_entries_get_actiondata_at_offset(selection_buf, selection);
|
||||||
|
|
||||||
switch (push_list)
|
switch (push_list)
|
||||||
{
|
{
|
||||||
|
@ -37,7 +37,7 @@ static int action_select_default(const char *path, const char *label, unsigned t
|
|||||||
|
|
||||||
menu_entry_get(&entry, idx, NULL, false);
|
menu_entry_get(&entry, idx, NULL, false);
|
||||||
|
|
||||||
cbs = menu_list_get_actiondata_at_offset(selection_buf, idx);
|
cbs = menu_entries_get_actiondata_at_offset(selection_buf, idx);
|
||||||
|
|
||||||
if (!cbs)
|
if (!cbs)
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -251,7 +251,7 @@ int generic_menu_iterate(enum menu_action action)
|
|||||||
break;
|
break;
|
||||||
case ITERATE_TYPE_INFO:
|
case ITERATE_TYPE_INFO:
|
||||||
{
|
{
|
||||||
menu_file_list_cbs_t *cbs = menu_list_get_actiondata_at_offset(selection_buf, selection);
|
menu_file_list_cbs_t *cbs = menu_entries_get_actiondata_at_offset(selection_buf, selection);
|
||||||
rarch_setting_t *setting = cbs->setting;
|
rarch_setting_t *setting = cbs->setting;
|
||||||
|
|
||||||
if (setting)
|
if (setting)
|
||||||
|
@ -603,7 +603,7 @@ static void xmb_selection_pointer_changed(bool allow_animations)
|
|||||||
float iy, real_iy;
|
float iy, real_iy;
|
||||||
float ia = xmb->item.passive.alpha;
|
float ia = xmb->item.passive.alpha;
|
||||||
float iz = xmb->item.passive.zoom;
|
float iz = xmb->item.passive.zoom;
|
||||||
xmb_node_t *node = (xmb_node_t*)menu_list_get_userdata_at_offset(selection_buf, i);
|
xmb_node_t *node = (xmb_node_t*)menu_entries_get_userdata_at_offset(selection_buf, i);
|
||||||
|
|
||||||
if (!node)
|
if (!node)
|
||||||
continue;
|
continue;
|
||||||
@ -656,7 +656,7 @@ static void xmb_list_open_old(xmb_handle_t *xmb,
|
|||||||
{
|
{
|
||||||
float ia = 0;
|
float ia = 0;
|
||||||
float real_y;
|
float real_y;
|
||||||
xmb_node_t *node = (xmb_node_t*)menu_list_get_userdata_at_offset(list, i);
|
xmb_node_t *node = (xmb_node_t*)menu_entries_get_userdata_at_offset(list, i);
|
||||||
|
|
||||||
if (!node)
|
if (!node)
|
||||||
continue;
|
continue;
|
||||||
@ -701,7 +701,7 @@ static void xmb_list_open_new(xmb_handle_t *xmb,
|
|||||||
float ia;
|
float ia;
|
||||||
float real_y;
|
float real_y;
|
||||||
xmb_node_t *node = (xmb_node_t*)
|
xmb_node_t *node = (xmb_node_t*)
|
||||||
menu_list_get_userdata_at_offset(list, i);
|
menu_entries_get_userdata_at_offset(list, i);
|
||||||
|
|
||||||
if (!node)
|
if (!node)
|
||||||
continue;
|
continue;
|
||||||
@ -773,7 +773,7 @@ static xmb_node_t *xmb_node_allocate_userdata(xmb_handle_t *xmb, unsigned i)
|
|||||||
static xmb_node_t* xmb_get_userdata_from_horizontal_list(
|
static xmb_node_t* xmb_get_userdata_from_horizontal_list(
|
||||||
xmb_handle_t *xmb, unsigned i)
|
xmb_handle_t *xmb, unsigned i)
|
||||||
{
|
{
|
||||||
return (xmb_node_t*)menu_list_get_actiondata_at_offset(xmb->horizontal_list, i);
|
return (xmb_node_t*)menu_entries_get_actiondata_at_offset(xmb->horizontal_list, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xmb_push_animations(xmb_node_t *node, float ia, float ix)
|
static void xmb_push_animations(xmb_node_t *node, float ia, float ix)
|
||||||
@ -795,7 +795,7 @@ static void xmb_list_switch_old(xmb_handle_t *xmb,
|
|||||||
for (i = 0; i < end; i++)
|
for (i = 0; i < end; i++)
|
||||||
{
|
{
|
||||||
xmb_node_t *node = (xmb_node_t*)
|
xmb_node_t *node = (xmb_node_t*)
|
||||||
menu_list_get_userdata_at_offset(list, i);
|
menu_entries_get_userdata_at_offset(list, i);
|
||||||
float ia = 0;
|
float ia = 0;
|
||||||
|
|
||||||
if (!node)
|
if (!node)
|
||||||
@ -836,7 +836,7 @@ static void xmb_list_switch_new(xmb_handle_t *xmb,
|
|||||||
for (i = 0; i < end; i++)
|
for (i = 0; i < end; i++)
|
||||||
{
|
{
|
||||||
xmb_node_t *node = (xmb_node_t*)
|
xmb_node_t *node = (xmb_node_t*)
|
||||||
menu_list_get_userdata_at_offset(list, i);
|
menu_entries_get_userdata_at_offset(list, i);
|
||||||
float ia = 0.5;
|
float ia = 0.5;
|
||||||
|
|
||||||
if (!node)
|
if (!node)
|
||||||
@ -1195,7 +1195,7 @@ static void xmb_draw_items(xmb_handle_t *xmb, gl_t *gl,
|
|||||||
menu_entry_t entry = {{0}};
|
menu_entry_t entry = {{0}};
|
||||||
GRuint texture_switch = 0;
|
GRuint texture_switch = 0;
|
||||||
GRuint icon = 0;
|
GRuint icon = 0;
|
||||||
xmb_node_t * node = (xmb_node_t*)menu_list_get_userdata_at_offset(list, i);
|
xmb_node_t * node = (xmb_node_t*)menu_entries_get_userdata_at_offset(list, i);
|
||||||
uint32_t hash_label = 0;
|
uint32_t hash_label = 0;
|
||||||
uint32_t hash_value = 0;
|
uint32_t hash_value = 0;
|
||||||
bool do_draw_text = false;
|
bool do_draw_text = false;
|
||||||
@ -1773,7 +1773,7 @@ static void xmb_layout(menu_handle_t *menu, xmb_handle_t *xmb)
|
|||||||
{
|
{
|
||||||
float ia = xmb->item.passive.alpha;
|
float ia = xmb->item.passive.alpha;
|
||||||
float iz = xmb->item.passive.zoom;
|
float iz = xmb->item.passive.zoom;
|
||||||
xmb_node_t *node = (xmb_node_t*)menu_list_get_userdata_at_offset(
|
xmb_node_t *node = (xmb_node_t*)menu_entries_get_userdata_at_offset(
|
||||||
selection_buf, i);
|
selection_buf, i);
|
||||||
|
|
||||||
if (!node)
|
if (!node)
|
||||||
|
@ -39,13 +39,6 @@ struct menu_entries
|
|||||||
rarch_setting_t *list_settings;
|
rarch_setting_t *list_settings;
|
||||||
};
|
};
|
||||||
|
|
||||||
static size_t menu_list_get_size(menu_list_t *list)
|
|
||||||
{
|
|
||||||
if (!list)
|
|
||||||
return 0;
|
|
||||||
return file_list_get_size(list->selection_buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void menu_list_free_list(file_list_t *list)
|
static void menu_list_free_list(file_list_t *list)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
@ -114,14 +107,14 @@ void menu_entries_get_last(const file_list_t *list,
|
|||||||
file_list_get_last(list, path, label, file_type, entry_idx);
|
file_list_get_last(list, path, label, file_type, entry_idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
void *menu_list_get_userdata_at_offset(const file_list_t *list, size_t idx)
|
void *menu_entries_get_userdata_at_offset(const file_list_t *list, size_t idx)
|
||||||
{
|
{
|
||||||
if (!list)
|
if (!list)
|
||||||
return NULL;
|
return NULL;
|
||||||
return (menu_file_list_cbs_t*)file_list_get_userdata_at_offset(list, idx);
|
return (menu_file_list_cbs_t*)file_list_get_userdata_at_offset(list, idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
menu_file_list_cbs_t *menu_list_get_actiondata_at_offset(
|
menu_file_list_cbs_t *menu_entries_get_actiondata_at_offset(
|
||||||
const file_list_t *list, size_t idx)
|
const file_list_t *list, size_t idx)
|
||||||
{
|
{
|
||||||
if (!list)
|
if (!list)
|
||||||
@ -306,15 +299,14 @@ static void menu_entries_build_scroll_indices(file_list_t *list)
|
|||||||
void menu_entries_refresh(file_list_t *list)
|
void menu_entries_refresh(file_list_t *list)
|
||||||
{
|
{
|
||||||
size_t list_size, selection;
|
size_t list_size, selection;
|
||||||
menu_list_t *menu_list = menu_list_get_ptr();
|
if (!list)
|
||||||
if (!menu_list || !list)
|
|
||||||
return;
|
return;
|
||||||
if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection))
|
if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
menu_entries_build_scroll_indices(list);
|
menu_entries_build_scroll_indices(list);
|
||||||
|
|
||||||
list_size = menu_list_get_size(menu_list);
|
list_size = menu_entries_get_size();
|
||||||
|
|
||||||
if ((selection >= list_size) && list_size)
|
if ((selection >= list_size) && list_size)
|
||||||
{
|
{
|
||||||
@ -398,7 +390,7 @@ void menu_entries_get(size_t i, menu_entry_t *entry)
|
|||||||
menu_entries_get_at_offset(selection_buf, i,
|
menu_entries_get_at_offset(selection_buf, i,
|
||||||
&path, &entry_label, &entry->type, &entry->entry_idx, NULL);
|
&path, &entry_label, &entry->type, &entry->entry_idx, NULL);
|
||||||
|
|
||||||
cbs = menu_list_get_actiondata_at_offset(selection_buf, i);
|
cbs = menu_entries_get_actiondata_at_offset(selection_buf, i);
|
||||||
|
|
||||||
if (cbs && cbs->action_get_value)
|
if (cbs && cbs->action_get_value)
|
||||||
cbs->action_get_value(selection_buf,
|
cbs->action_get_value(selection_buf,
|
||||||
@ -641,13 +633,13 @@ size_t menu_entries_get_size(void)
|
|||||||
menu_list_t *menu_list = menu_list_get_ptr();
|
menu_list_t *menu_list = menu_list_get_ptr();
|
||||||
if (!menu_list)
|
if (!menu_list)
|
||||||
return 0;
|
return 0;
|
||||||
return menu_list_get_size(menu_list);
|
return file_list_get_size(menu_list->selection_buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
rarch_setting_t *menu_entries_get_setting(uint32_t i)
|
rarch_setting_t *menu_entries_get_setting(uint32_t i)
|
||||||
{
|
{
|
||||||
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr();
|
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr();
|
||||||
menu_file_list_cbs_t *cbs = menu_list_get_actiondata_at_offset(selection_buf, i);
|
menu_file_list_cbs_t *cbs = menu_entries_get_actiondata_at_offset(selection_buf, i);
|
||||||
|
|
||||||
if (!cbs)
|
if (!cbs)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -155,9 +155,9 @@ void menu_entries_get_at_offset(const file_list_t *list, size_t idx,
|
|||||||
|
|
||||||
menu_list_t *menu_list_get_ptr(void);
|
menu_list_t *menu_list_get_ptr(void);
|
||||||
|
|
||||||
void *menu_list_get_userdata_at_offset(const file_list_t *list, size_t idx);
|
void *menu_entries_get_userdata_at_offset(const file_list_t *list, size_t idx);
|
||||||
|
|
||||||
menu_file_list_cbs_t *menu_list_get_actiondata_at_offset(const file_list_t *list, size_t idx);
|
menu_file_list_cbs_t *menu_entries_get_actiondata_at_offset(const file_list_t *list, size_t idx);
|
||||||
|
|
||||||
void menu_entries_get_last(const file_list_t *list,
|
void menu_entries_get_last(const file_list_t *list,
|
||||||
const char **path, const char **label,
|
const char **path, const char **label,
|
||||||
@ -165,7 +165,7 @@ void menu_entries_get_last(const file_list_t *list,
|
|||||||
|
|
||||||
void menu_entries_clear(file_list_t *list);
|
void menu_entries_clear(file_list_t *list);
|
||||||
|
|
||||||
void menu_list_set_alt_at_offset(file_list_t *list, size_t idx,
|
void menu_entries_set_alt_at_offset(file_list_t *list, size_t idx,
|
||||||
const char *alt);
|
const char *alt);
|
||||||
|
|
||||||
void menu_entries_refresh(file_list_t *list);
|
void menu_entries_refresh(file_list_t *list);
|
||||||
|
@ -299,7 +299,7 @@ void menu_entry_get(menu_entry_t *entry, size_t i,
|
|||||||
menu_entries_get_at_offset(list, i, &path, &entry_label, &entry->type,
|
menu_entries_get_at_offset(list, i, &path, &entry_label, &entry->type,
|
||||||
&entry->entry_idx, NULL);
|
&entry->entry_idx, NULL);
|
||||||
|
|
||||||
cbs = menu_list_get_actiondata_at_offset(list, i);
|
cbs = menu_entries_get_actiondata_at_offset(list, i);
|
||||||
|
|
||||||
if (cbs && cbs->action_get_value && use_representation)
|
if (cbs && cbs->action_get_value && use_representation)
|
||||||
{
|
{
|
||||||
@ -352,7 +352,7 @@ int menu_entry_action(menu_entry_t *entry, unsigned i, enum menu_action action)
|
|||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr();
|
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr();
|
||||||
menu_file_list_cbs_t *cbs = menu_list_get_actiondata_at_offset(selection_buf, i);
|
menu_file_list_cbs_t *cbs = menu_entries_get_actiondata_at_offset(selection_buf, i);
|
||||||
|
|
||||||
switch (action)
|
switch (action)
|
||||||
{
|
{
|
||||||
@ -412,7 +412,7 @@ int menu_entry_action(menu_entry_t *entry, unsigned i, enum menu_action action)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
cbs = menu_list_get_actiondata_at_offset(selection_buf, i);
|
cbs = menu_entries_get_actiondata_at_offset(selection_buf, i);
|
||||||
|
|
||||||
if (menu_entries_needs_refresh())
|
if (menu_entries_needs_refresh())
|
||||||
{
|
{
|
||||||
|
@ -1185,7 +1185,7 @@ void menu_input_post_iterate(int *ret, unsigned action)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (selection_buf)
|
if (selection_buf)
|
||||||
cbs = menu_list_get_actiondata_at_offset(selection_buf, selection);
|
cbs = menu_entries_get_actiondata_at_offset(selection_buf, selection);
|
||||||
|
|
||||||
menu_entry_get(&entry, selection, NULL, false);
|
menu_entry_get(&entry, selection, NULL, false);
|
||||||
|
|
||||||
|
@ -516,7 +516,7 @@ int menu_setting_set(unsigned type, const char *label,
|
|||||||
if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection))
|
if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
cbs = menu_list_get_actiondata_at_offset(selection_buf, selection);
|
cbs = menu_entries_get_actiondata_at_offset(selection_buf, selection);
|
||||||
|
|
||||||
if (!cbs)
|
if (!cbs)
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user