mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +00:00
Avoid small wrapper functions like file_list_get_userdata_at_offset
in hot functions
This commit is contained in:
parent
c7e8d2adf5
commit
bfd0611815
@ -337,8 +337,8 @@ void ozone_compute_entries_position(ozone_handle_t *ozone)
|
|||||||
|
|
||||||
menu_entries_ctl(MENU_ENTRIES_CTL_START_GET, &i);
|
menu_entries_ctl(MENU_ENTRIES_CTL_START_GET, &i);
|
||||||
|
|
||||||
entries_end = menu_entries_get_size();
|
entries_end = menu_entries_get_size();
|
||||||
selection_buf = menu_entries_get_selection_buf_ptr(0);
|
selection_buf = menu_entries_get_selection_buf_ptr(0);
|
||||||
|
|
||||||
video_driver_get_size(&video_info_width, &video_info_height);
|
video_driver_get_size(&video_info_width, &video_info_height);
|
||||||
|
|
||||||
@ -369,14 +369,14 @@ void ozone_compute_entries_position(ozone_handle_t *ozone)
|
|||||||
ozone->empty_playlist = false;
|
ozone->empty_playlist = false;
|
||||||
|
|
||||||
/* Cache node */
|
/* Cache node */
|
||||||
node = (ozone_node_t*)file_list_get_userdata_at_offset(selection_buf, i);
|
node = (ozone_node_t*)selection_buf->list[i].userdata;
|
||||||
|
|
||||||
if (!node)
|
if (!node)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
node->height = ozone->dimensions.entry_height;
|
node->height = ozone->dimensions.entry_height;
|
||||||
node->wrap = false;
|
node->wrap = false;
|
||||||
node->sublabel_lines = 0;
|
node->sublabel_lines = 0;
|
||||||
|
|
||||||
if (menu_show_sublabels)
|
if (menu_show_sublabels)
|
||||||
{
|
{
|
||||||
@ -420,7 +420,7 @@ void ozone_compute_entries_position(ozone_handle_t *ozone)
|
|||||||
|
|
||||||
/* Update scrolling */
|
/* Update scrolling */
|
||||||
ozone->selection = menu_navigation_get_selection();
|
ozone->selection = menu_navigation_get_selection();
|
||||||
ozone_update_scroll(ozone, false, (ozone_node_t*) file_list_get_userdata_at_offset(selection_buf, ozone->selection));
|
ozone_update_scroll(ozone, false, (ozone_node_t*)selection_buf->list[ozone->selection].userdata);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ozone_entries_update_thumbnail_bar(ozone_handle_t *ozone, bool is_playlist, bool allow_animation)
|
void ozone_entries_update_thumbnail_bar(ozone_handle_t *ozone, bool is_playlist, bool allow_animation)
|
||||||
@ -549,7 +549,7 @@ void ozone_draw_entries(
|
|||||||
if (entry_old_selected && old_selection_y == 0)
|
if (entry_old_selected && old_selection_y == 0)
|
||||||
old_selection_y = y;
|
old_selection_y = y;
|
||||||
|
|
||||||
node = (ozone_node_t*) file_list_get_userdata_at_offset(selection_buf, i);
|
node = (ozone_node_t*)selection_buf->list[i].userdata;
|
||||||
|
|
||||||
if (!node || ozone->empty_playlist)
|
if (!node || ozone->empty_playlist)
|
||||||
goto border_iterate;
|
goto border_iterate;
|
||||||
@ -673,8 +673,7 @@ border_iterate:
|
|||||||
ticker.spacer = ticker_spacer;
|
ticker.spacer = ticker_spacer;
|
||||||
}
|
}
|
||||||
|
|
||||||
node = (ozone_node_t*)
|
node = (ozone_node_t*)selection_buf->list[i].userdata;
|
||||||
file_list_get_userdata_at_offset(selection_buf, i);
|
|
||||||
|
|
||||||
if (!node)
|
if (!node)
|
||||||
continue;
|
continue;
|
||||||
@ -773,7 +772,8 @@ border_iterate:
|
|||||||
uintptr_t texture = tex;
|
uintptr_t texture = tex;
|
||||||
|
|
||||||
/* Console specific icons */
|
/* Console specific icons */
|
||||||
if (entry.type == FILE_TYPE_RPL_ENTRY && ozone->categories_selection_ptr > ozone->system_tab_end)
|
if ( entry.type == FILE_TYPE_RPL_ENTRY
|
||||||
|
&& ozone->categories_selection_ptr > ozone->system_tab_end)
|
||||||
{
|
{
|
||||||
ozone_node_t *sidebar_node = (ozone_node_t*) file_list_get_userdata_at_offset(&ozone->horizontal_list, ozone->categories_selection_ptr - ozone->system_tab_end-1);
|
ozone_node_t *sidebar_node = (ozone_node_t*) file_list_get_userdata_at_offset(&ozone->horizontal_list, ozone->categories_selection_ptr - ozone->system_tab_end-1);
|
||||||
|
|
||||||
|
@ -401,7 +401,7 @@ void ozone_draw_sidebar(
|
|||||||
|
|
||||||
uint32_t text_color = COLOR_TEXT_ALPHA((selected ? ozone->theme->text_selected_rgba : ozone->theme->text_rgba), text_alpha);
|
uint32_t text_color = COLOR_TEXT_ALPHA((selected ? ozone->theme->text_selected_rgba : ozone->theme->text_rgba), text_alpha);
|
||||||
|
|
||||||
ozone_node_t *node = (ozone_node_t*) file_list_get_userdata_at_offset(&ozone->horizontal_list, i);
|
ozone_node_t *node = (ozone_node_t*)ozone->horizontal_list.list[i].userdata;
|
||||||
float *col = (selected ? ozone->theme->text_selected : ozone->theme->entries_icon);
|
float *col = (selected ? ozone->theme->text_selected : ozone->theme->entries_icon);
|
||||||
|
|
||||||
if (!node)
|
if (!node)
|
||||||
@ -898,7 +898,7 @@ void ozone_context_reset_horizontal_list(ozone_handle_t *ozone)
|
|||||||
{
|
{
|
||||||
const char *path = NULL;
|
const char *path = NULL;
|
||||||
const char *console_name = NULL;
|
const char *console_name = NULL;
|
||||||
ozone_node_t *node = (ozone_node_t*)file_list_get_userdata_at_offset(&ozone->horizontal_list, i);
|
ozone_node_t *node = (ozone_node_t*)ozone->horizontal_list.list[i].userdata;
|
||||||
|
|
||||||
if (!node)
|
if (!node)
|
||||||
{
|
{
|
||||||
@ -1008,7 +1008,7 @@ void ozone_context_destroy_horizontal_list(ozone_handle_t *ozone)
|
|||||||
for (i = 0; i < list_size; i++)
|
for (i = 0; i < list_size; i++)
|
||||||
{
|
{
|
||||||
const char *path = NULL;
|
const char *path = NULL;
|
||||||
ozone_node_t *node = (ozone_node_t*)file_list_get_userdata_at_offset(&ozone->horizontal_list, i);
|
ozone_node_t *node = (ozone_node_t*)ozone->horizontal_list.list[i].userdata;
|
||||||
|
|
||||||
if (!node)
|
if (!node)
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user