diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 79646e13d4..db67ffdae1 100755 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -174,132 +174,81 @@ enum typedef struct xmb_handle { - file_list_t *selection_buf_old; - file_list_t *horizontal_list; - size_t selection_ptr_old; + bool mouse_show; + + uint8_t system_tab_end; + uint8_t tabs[8]; + int depth; int old_depth; - char box_message[1024]; - float x; - float alpha; + int icon_size; + int cursor_size; + + size_t categories_selection_ptr; + size_t categories_selection_ptr_old; + size_t selection_ptr_old; + + unsigned categories_active_idx; + unsigned categories_active_idx_old; uintptr_t thumbnail; uintptr_t savestate_thumbnail; + + float x; + float alpha; float thumbnail_width; float thumbnail_height; float savestate_thumbnail_width; float savestate_thumbnail_height; + float above_subitem_offset; + float above_item_offset; + float active_item_factor; + float under_item_offset; + float shadow_offset; + float font_size; + float font2_size; + + float margins_screen_left; + float margins_screen_top; + float margins_setting_left; + float margins_title_left; + float margins_title_top; + float margins_title_bottom; + float margins_label_left; + float margins_label_top; + float icon_spacing_horizontal; + float icon_spacing_vertical; + float items_active_alpha; + float items_active_zoom; + float items_passive_alpha; + float items_passive_zoom; + float margins_dialog; + float margins_slice; + float textures_arrow_alpha; + float categories_x_pos; + float categories_passive_alpha; + float categories_passive_zoom; + float categories_active_zoom; + float categories_active_alpha; + + uint64_t frame_count; + + char title_name[255]; + char box_message[1024]; char background_file_path[PATH_MAX_LENGTH]; char thumbnail_system[PATH_MAX_LENGTH]; char thumbnail_content[PATH_MAX_LENGTH]; char thumbnail_file_path[PATH_MAX_LENGTH]; char savestate_thumbnail_file_path[PATH_MAX_LENGTH]; - uint64_t frame_count; - bool mouse_show; + file_list_t *selection_buf_old; + file_list_t *horizontal_list; struct { - struct - { - float left; - float top; - - } screen; - - struct - { - float left; - } setting; - - struct - { - float left; - float top; - float bottom; - } title; - - struct - { - float left; - float top; - } label; - - float dialog; - float slice; - } margins; - - float above_subitem_offset; - float above_item_offset; - float active_item_factor; - float under_item_offset; - - float shadow_offset; - - char title_name[255]; - - struct - { - struct - { - float alpha; - } arrow; - menu_texture_item bg; menu_texture_item list[XMB_TEXTURE_LAST]; } textures; - struct - { - struct - { - float horizontal; - float vertical; - } spacing; - - int size; - } icon; - - struct - { - int size; - } cursor; - - struct - { - struct - { - unsigned idx; - unsigned idx_old; - float alpha; - float zoom; - } active; - - struct - { - float alpha; - float zoom; - } passive; - - float x_pos; - size_t selection_ptr_old; - size_t selection_ptr; - } categories; - - struct - { - struct - { - float alpha; - float zoom; - } active; - - struct - { - float alpha; - float zoom; - } passive; - } items; - xmb_node_t main_menu_node; #ifdef HAVE_IMAGEVIEWER xmb_node_t images_tab_node; @@ -316,13 +265,8 @@ typedef struct xmb_handle font_data_t *font; font_data_t *font2; - float font_size; - float font2_size; video_font_raster_block_t raster_block; video_font_raster_block_t raster_block2; - - uint8_t tabs[8]; - uint8_t system_tab_end; } xmb_handle_t; static float coord_shadow[] = { @@ -571,7 +515,7 @@ static size_t xmb_list_get_selection(void *data) if (!xmb) return 0; - return xmb->categories.selection_ptr; + return xmb->categories_selection_ptr; } static size_t xmb_list_get_size(void *data, enum menu_list_type type) @@ -623,7 +567,7 @@ static void *xmb_list_get_entry(void *data, enum menu_list_type type, unsigned i static INLINE float xmb_item_y(const xmb_handle_t *xmb, int i, size_t current) { - float iy = xmb->icon.spacing.vertical; + float iy = xmb->icon_spacing_vertical; if (i < (int)current) if (xmb->depth > 1) @@ -634,7 +578,7 @@ static INLINE float xmb_item_y(const xmb_handle_t *xmb, int i, size_t current) iy *= (i - (int)current + xmb->under_item_offset); if (i == (int)current) - iy = xmb->icon.spacing.vertical * xmb->active_item_factor; + iy = xmb->icon_spacing_vertical * xmb->active_item_factor; return iy; } @@ -939,14 +883,14 @@ static void xmb_render_messagebox_internal( menu_display_blend_begin(); menu_display_draw_texture_slice( - x - longest_width/2 - xmb->margins.dialog, - y + xmb->margins.slice - xmb->margins.dialog, + x - longest_width/2 - xmb->margins_dialog, + y + xmb->margins_slice - xmb->margins_dialog, 256, 256, - longest_width + xmb->margins.dialog*2, - line_height * list->size + xmb->margins.dialog*2, + longest_width + xmb->margins_dialog * 2, + line_height * list->size + xmb->margins_dialog * 2, width, height, &coord_white[0], - xmb->margins.slice, 1.0, xmb->textures.list[XMB_TEXTURE_DIALOG_SLICE]); + xmb->margins_slice, 1.0, xmb->textures.list[XMB_TEXTURE_DIALOG_SLICE]); for (i = 0; i < list->size; i++) { @@ -1196,7 +1140,7 @@ static void xmb_selection_pointer_changed( menu_entry_get(&entry, 0, selection, NULL, true); end = (unsigned)menu_entries_get_end(); - threshold = xmb->icon.size*10; + threshold = xmb->icon_size * 10; video_driver_get_size(NULL, &height); @@ -1208,8 +1152,8 @@ static void xmb_selection_pointer_changed( for (i = 0; i < end; i++) { float iy, real_iy; - float ia = xmb->items.passive.alpha; - float iz = xmb->items.passive.zoom; + float ia = xmb->items_passive_alpha; + float iz = xmb->items_passive_zoom; xmb_node_t *node = (xmb_node_t*) menu_entries_get_userdata_at_offset(selection_buf, i); @@ -1217,7 +1161,7 @@ static void xmb_selection_pointer_changed( continue; iy = xmb_item_y(xmb, i, selection); - real_iy = iy + xmb->margins.screen.top; + real_iy = iy + xmb->margins_screen_top; if (i == selection) { @@ -1225,8 +1169,8 @@ static void xmb_selection_pointer_changed( size_t xmb_list = xmb_list_get_selection(xmb); unsigned entry_type = menu_entry_get_type_new(&entry); - ia = xmb->items.active.alpha; - iz = xmb->items.active.zoom; + ia = xmb->items_active_alpha; + iz = xmb->items_active_zoom; if (!string_is_equal(thumb_ident, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF))) @@ -1301,7 +1245,7 @@ static void xmb_list_open_old(xmb_handle_t *xmb, file_list_t *list, int dir, size_t current) { unsigned i, height = 0; - int threshold = xmb->icon.size * 10; + int threshold = xmb->icon_size * 10; size_t end = 0; end = file_list_get_size(list); @@ -1319,17 +1263,17 @@ static void xmb_list_open_old(xmb_handle_t *xmb, continue; if (i == current) - ia = xmb->items.active.alpha; + ia = xmb->items_active_alpha; if (dir == -1) ia = 0; - real_y = node->y + xmb->margins.screen.top; + real_y = node->y + xmb->margins_screen_top; if (real_y < -threshold || real_y > height+threshold) { node->alpha = ia; node->label_alpha = 0; - node->x = xmb->icon.size * dir * -2; + node->x = xmb->icon_size * dir * -2; } else { @@ -1349,7 +1293,7 @@ static void xmb_list_open_old(xmb_handle_t *xmb, menu_animation_push(&anim_entry); - anim_entry.target_value = xmb->icon.size * dir * -2; + anim_entry.target_value = xmb->icon_size * dir * -2; anim_entry.subject = &node->x; menu_animation_push(&anim_entry); @@ -1362,7 +1306,7 @@ static void xmb_list_open_new(xmb_handle_t *xmb, { unsigned i, height; size_t skip = 0; - int threshold = xmb->icon.size * 10; + int threshold = xmb->icon_size * 10; size_t end = file_list_get_size(list); video_driver_get_size(NULL, &height); @@ -1383,18 +1327,18 @@ static void xmb_list_open_new(xmb_handle_t *xmb, if (dir == 1 || dir == -1) node->label_alpha = 0; - node->x = xmb->icon.size * dir * 2; + node->x = xmb->icon_size * dir * 2; node->y = xmb_item_y(xmb, i, current); - node->zoom = xmb->categories.passive.zoom; + node->zoom = xmb->categories_passive_zoom; - real_y = node->y + xmb->margins.screen.top; + real_y = node->y + xmb->margins_screen_top; if (i == current) - node->zoom = xmb->categories.active.zoom; + node->zoom = xmb->categories_active_zoom; - ia = xmb->items.passive.alpha; + ia = xmb->items_passive_alpha; if (i == current) - ia = xmb->items.active.alpha; + ia = xmb->items_active_alpha; if (real_y < -threshold || real_y > height+threshold) { @@ -1448,13 +1392,13 @@ static xmb_node_t *xmb_node_allocate_userdata(xmb_handle_t *xmb, unsigned i) return NULL; } - node->alpha = xmb->categories.passive.alpha; - node->zoom = xmb->categories.passive.zoom; + node->alpha = xmb->categories_passive_alpha; + node->zoom = xmb->categories_passive_zoom; - if ((i + xmb->system_tab_end) == xmb->categories.active.idx) + if ((i + xmb->system_tab_end) == xmb->categories_active_idx) { - node->alpha = xmb->categories.active.alpha; - node->zoom = xmb->categories.active.zoom; + node->alpha = xmb->categories_active_alpha; + node->zoom = xmb->categories_active_zoom; } tmp = (xmb_node_t*)file_list_get_userdata_at_offset(xmb->horizontal_list, i); @@ -1500,7 +1444,7 @@ static void xmb_list_switch_old(xmb_handle_t *xmb, { unsigned i, first, last, height; size_t end = file_list_get_size(list); - float ix = -xmb->icon.spacing.horizontal * dir; + float ix = -xmb->icon_spacing_horizontal * dir; float ia = 0; first = 0; @@ -1586,17 +1530,17 @@ static void xmb_list_switch_new(xmb_handle_t *xmb, { xmb_node_t *node = (xmb_node_t*) menu_entries_get_userdata_at_offset(list, i); - float ia = xmb->items.passive.alpha; + float ia = xmb->items_passive_alpha; if (!node) continue; - node->x = xmb->icon.spacing.horizontal * dir; + node->x = xmb->icon_spacing_horizontal * dir; node->alpha = 0; node->label_alpha = 0; if (i == current) - ia = xmb->items.active.alpha; + ia = xmb->items_active_alpha; if (i >= first && i <= last) xmb_push_animations(node, (uintptr_t)list, ia, 0); @@ -1610,7 +1554,7 @@ static void xmb_list_switch_new(xmb_handle_t *xmb, static void xmb_set_title(xmb_handle_t *xmb) { - if (xmb->categories.selection_ptr <= xmb->system_tab_end) + if (xmb->categories_selection_ptr <= xmb->system_tab_end) { menu_entries_get_title(xmb->title_name, sizeof(xmb->title_name)); } @@ -1619,7 +1563,7 @@ static void xmb_set_title(xmb_handle_t *xmb) const char *path = NULL; menu_entries_get_at_offset( xmb->horizontal_list, - xmb->categories.selection_ptr - (xmb->system_tab_end + 1), + xmb->categories_selection_ptr - (xmb->system_tab_end + 1), &path, NULL, NULL, NULL, NULL); if (!path) @@ -1682,17 +1626,17 @@ static void xmb_list_switch_horizontal_list(xmb_handle_t *xmb) for (j = 0; j <= list_size; j++) { menu_animation_ctx_entry_t entry; - float ia = xmb->categories.passive.alpha; - float iz = xmb->categories.passive.zoom; + float ia = xmb->categories_passive_alpha; + float iz = xmb->categories_passive_zoom; xmb_node_t *node = xmb_get_node(xmb, j); if (!node) continue; - if (j == xmb->categories.active.idx) + if (j == xmb->categories_active_idx) { - ia = xmb->categories.active.alpha; - iz = xmb->categories.active.zoom; + ia = xmb->categories_active_alpha; + iz = xmb->categories_active_zoom; } entry.duration = XMB_DELAY; @@ -1720,16 +1664,16 @@ static void xmb_list_switch(xmb_handle_t *xmb) size_t selection = menu_navigation_get_selection(); settings_t *settings = config_get_ptr(); - if (xmb->categories.selection_ptr > xmb->categories.selection_ptr_old) + if (xmb->categories_selection_ptr > xmb->categories_selection_ptr_old) dir = 1; - xmb->categories.active.idx += dir; + xmb->categories_active_idx += dir; xmb_list_switch_horizontal_list(xmb); anim_entry.duration = XMB_DELAY; - anim_entry.target_value = xmb->icon.spacing.horizontal * -(float)xmb->categories.selection_ptr; - anim_entry.subject = &xmb->categories.x_pos; + anim_entry.target_value = xmb->icon_spacing_horizontal * -(float)xmb->categories_selection_ptr; + anim_entry.subject = &xmb->categories_x_pos; anim_entry.easing_enum = EASING_OUT_QUAD; /* TODO/FIXME - integer conversion resulted in change of sign */ anim_entry.tag = -1; @@ -1739,7 +1683,7 @@ static void xmb_list_switch(xmb_handle_t *xmb) menu_animation_push(&anim_entry); dir = -1; - if (xmb->categories.selection_ptr > xmb->categories.selection_ptr_old) + if (xmb->categories_selection_ptr > xmb->categories_selection_ptr_old) dir = 1; xmb_list_switch_old(xmb, xmb->selection_buf_old, @@ -1748,7 +1692,7 @@ static void xmb_list_switch(xmb_handle_t *xmb) /* Check if we are to have horizontal animations. */ if (settings->bools.menu_horizontal_animation) xmb_list_switch_new(xmb, selection_buf, dir, selection); - xmb->categories.active.idx_old = (unsigned)xmb->categories.selection_ptr; + xmb->categories_active_idx_old = (unsigned)xmb->categories_selection_ptr; if (!string_is_equal(xmb_thumbnails_ident(), msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF))) @@ -1782,10 +1726,10 @@ static void xmb_list_open_horizontal_list(xmb_handle_t *xmb) if (!node) continue; - if (j == xmb->categories.active.idx) - ia = xmb->categories.active.alpha; + if (j == xmb->categories_active_idx) + ia = xmb->categories_active_alpha; else if (xmb->depth <= 1) - ia = xmb->categories.passive.alpha; + ia = xmb->categories_passive_alpha; entry.duration = XMB_DELAY; entry.target_value = ia; @@ -1869,15 +1813,15 @@ static void xmb_toggle_horizontal_list(xmb_handle_t *xmb) continue; node->alpha = 0; - node->zoom = xmb->categories.passive.zoom; + node->zoom = xmb->categories_passive_zoom; - if (i == xmb->categories.active.idx) + if (i == xmb->categories_active_idx) { - node->alpha = xmb->categories.active.alpha; - node->zoom = xmb->categories.active.zoom; + node->alpha = xmb->categories_active_alpha; + node->zoom = xmb->categories_active_zoom; } else if (xmb->depth <= 1) - node->alpha = xmb->categories.passive.alpha; + node->alpha = xmb->categories_passive_alpha; } } @@ -1889,11 +1833,11 @@ static void xmb_context_reset_horizontal_list( size_t list_size = xmb_list_get_size(xmb, MENU_LIST_HORIZONTAL); - xmb->categories.x_pos = xmb->icon.spacing.horizontal * - -(float)xmb->categories.selection_ptr; + xmb->categories_x_pos = xmb->icon_spacing_horizontal * + -(float)xmb->categories_selection_ptr; depth = (xmb->depth > 1) ? 2 : 1; - xmb->x = xmb->icon.size * -(depth*2-2); + xmb->x = xmb->icon_size * -(depth*2-2); for (i = 0; i < list_size; i++) { @@ -2054,7 +1998,7 @@ static void xmb_list_open(xmb_handle_t *xmb) entry.duration = XMB_DELAY; - entry.target_value = xmb->icon.size * -(xmb->depth*2-2); + entry.target_value = xmb->icon_size * -(xmb->depth*2-2); entry.subject = &xmb->x; entry.easing_enum = EASING_OUT_QUAD; /* TODO/FIXME - integer conversion resulted in change of sign */ @@ -2067,7 +2011,7 @@ static void xmb_list_open(xmb_handle_t *xmb) menu_animation_push(&entry); entry.target_value = 0; - entry.subject = &xmb->textures.arrow.alpha; + entry.subject = &xmb->textures_arrow_alpha; menu_animation_push(&entry); break; @@ -2075,7 +2019,7 @@ static void xmb_list_open(xmb_handle_t *xmb) menu_animation_push(&entry); entry.target_value = 1; - entry.subject = &xmb->textures.arrow.alpha; + entry.subject = &xmb->textures_arrow_alpha; menu_animation_push(&entry); break; @@ -2106,7 +2050,7 @@ static void xmb_populate_entries(void *data, xmb_set_title(xmb); - if (xmb->categories.selection_ptr != xmb->categories.active.idx_old) + if (xmb->categories_selection_ptr != xmb->categories_active_idx_old) xmb_list_switch(xmb); else xmb_list_open(xmb); @@ -2176,7 +2120,7 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb, if (core_node) return core_node->content_icon; - switch (xmb_get_system_tab(xmb, (unsigned)xmb->categories.selection_ptr)) + switch (xmb_get_system_tab(xmb, (unsigned)xmb->categories_selection_ptr)) { case XMB_SYSTEM_TAB_FAVORITES: return xmb->textures.list[XMB_TEXTURE_FAVORITE]; @@ -2267,7 +2211,7 @@ static void xmb_calculate_visible_range(const xmb_handle_t *xmb, unsigned *first, unsigned *last) { unsigned j; - float base_y = xmb->margins.screen.top; + float base_y = xmb->margins_screen_top; *first = 0; *last = list_size ? list_size - 1 : 0; @@ -2276,7 +2220,7 @@ static void xmb_calculate_visible_range(const xmb_handle_t *xmb, { for (j = current; j-- > 0; ) { - float bottom = xmb_item_y(xmb, j, current) + base_y + xmb->icon.size; + float bottom = xmb_item_y(xmb, j, current) + base_y + xmb->icon_size; if (bottom < 0) break; @@ -2358,7 +2302,7 @@ static void xmb_draw_items( char ticker_str[PATH_MAX_LENGTH]; char tmp[255]; unsigned entry_type = 0; - const float half_size = xmb->icon.size / 2.0f; + const float half_size = xmb->icon_size / 2.0f; uintptr_t texture_switch = 0; xmb_node_t * node = (xmb_node_t*) menu_entries_get_userdata_at_offset(list, i); @@ -2373,16 +2317,16 @@ static void xmb_draw_items( menu_entry_init(entry); - icon_y = xmb->margins.screen.top + node->y + half_size; + icon_y = xmb->margins_screen_top + node->y + half_size; if (icon_y < half_size) continue; - if (icon_y > height + xmb->icon.size) + if (icon_y > height + xmb->icon_size) break; - icon_x = node->x + xmb->margins.screen.left + - xmb->icon.spacing.horizontal - half_size; + icon_x = node->x + xmb->margins_screen_left + + xmb->icon_spacing_horizontal - half_size; if (icon_x < -half_size || icon_x > width) continue; @@ -2458,7 +2402,7 @@ static void xmb_draw_items( menu_animation_ticker(&ticker); - label_offset = xmb->margins.label.top; + label_offset = xmb->margins_label_top; if (i == current && width > 320 && height > 240 && !string_is_empty(entry->sublabel)) { @@ -2466,22 +2410,22 @@ static void xmb_draw_items( entry_sublabel[0] = '\0'; - label_offset = - xmb->margins.label.top; + label_offset = - xmb->margins_label_top; word_wrap(entry_sublabel, entry->sublabel, 50, true); xmb_draw_text(menu_disp_info, xmb, entry_sublabel, - node->x + xmb->margins.screen.left + - xmb->icon.spacing.horizontal + xmb->margins.label.left, - xmb->margins.screen.top + node->y + xmb->margins.label.top*3.5, + node->x + xmb->margins_screen_left + + xmb->icon_spacing_horizontal + xmb->margins_label_left, + xmb->margins_screen_top + node->y + xmb->margins_label_top*3.5, 1, node->label_alpha, TEXT_ALIGN_LEFT, width, height, xmb->font2); } xmb_draw_text(menu_disp_info, xmb, tmp, - node->x + xmb->margins.screen.left + - xmb->icon.spacing.horizontal + xmb->margins.label.left, - xmb->margins.screen.top + node->y + label_offset, + node->x + xmb->margins_screen_left + + xmb->icon_spacing_horizontal + xmb->margins_label_left, + xmb->margins_screen_top + node->y + label_offset, 1, node->label_alpha, TEXT_ALIGN_LEFT, width, height, xmb->font); @@ -2498,11 +2442,11 @@ static void xmb_draw_items( if (do_draw_text) xmb_draw_text(menu_disp_info, xmb, tmp, node->x + - + xmb->margins.screen.left - + xmb->icon.spacing.horizontal - + xmb->margins.label.left - + xmb->margins.setting.left, - xmb->margins.screen.top + node->y + xmb->margins.label.top, + + xmb->margins_screen_left + + xmb->icon_spacing_horizontal + + xmb->margins_label_left + + xmb->margins_setting_left, + xmb->margins_screen_top + node->y + xmb->margins_label_top, 1, node->label_alpha, TEXT_ALIGN_LEFT, @@ -2533,7 +2477,7 @@ static void xmb_draw_items( xmb_draw_icon( menu_disp_info, - xmb->icon.size, + xmb->icon_size, &mymat, texture, x, @@ -2552,13 +2496,13 @@ static void xmb_draw_items( if (texture_switch != 0 && color[3] != 0) xmb_draw_icon( menu_disp_info, - xmb->icon.size, + xmb->icon_size, &mymat, texture_switch, - node->x + xmb->margins.screen.left - + xmb->icon.spacing.horizontal - + xmb->icon.size / 2.0 + xmb->margins.setting.left, - xmb->margins.screen.top + node->y + xmb->icon.size / 2.0, + node->x + xmb->margins_screen_left + + xmb->icon_spacing_horizontal + + xmb->icon_size / 2.0 + xmb->margins_setting_left, + xmb->margins_screen_top + node->y + xmb->icon_size / 2.0, width, height, node->alpha, 0, @@ -2599,7 +2543,7 @@ static void xmb_render(void *data, bool is_idle) size_t selection = menu_navigation_get_selection(); int16_t pointer_y = menu_input_pointer_state(MENU_POINTER_Y_AXIS); int16_t mouse_y = menu_input_mouse_state(MENU_MOUSE_Y_AXIS) - + (xmb->cursor.size/2); + + (xmb->cursor_size/2); unsigned first = 0, last = end; unsigned height; @@ -2610,9 +2554,9 @@ static void xmb_render(void *data, bool is_idle) for (i = first; i <= last; i++) { - float item_y1 = xmb->margins.screen.top + float item_y1 = xmb->margins_screen_top + xmb_item_y(xmb, (int)i, selection); - float item_y2 = item_y1 + xmb->icon.size; + float item_y2 = item_y1 + xmb->icon_size; if (pointer_enable) { @@ -2845,14 +2789,15 @@ static void xmb_frame(void *data, video_frame_info_t *video_info) /* Title text */ xmb_draw_text(menu_disp_info, xmb, - title_truncated, xmb->margins.title.left, - xmb->margins.title.top, 1, 1, TEXT_ALIGN_LEFT, + title_truncated, xmb->margins_title_left, + xmb->margins_title_top, + 1, 1, TEXT_ALIGN_LEFT, width, height, xmb->font); if (settings->bools.menu_core_enable && menu_entries_get_core_title(title_msg, sizeof(title_msg)) == 0) - xmb_draw_text(menu_disp_info, xmb, title_msg, xmb->margins.title.left, - height - xmb->margins.title.bottom, 1, 1, TEXT_ALIGN_LEFT, + xmb_draw_text(menu_disp_info, xmb, title_msg, xmb->margins_title_left, + height - xmb->margins_title_bottom, 1, 1, TEXT_ALIGN_LEFT, width, height, xmb->font); rotate_draw.matrix = &mymat; @@ -2868,9 +2813,10 @@ static void xmb_frame(void *data, video_frame_info_t *video_info) if (xmb->savestate_thumbnail) xmb_draw_thumbnail(menu_disp_info, xmb, &coord_white[0], width, height, - xmb->margins.screen.left + xmb->icon.spacing.horizontal + - xmb->icon.spacing.horizontal*4 - xmb->icon.size / 4, - xmb->margins.screen.top + xmb->icon.size + xmb->savestate_thumbnail_height, + xmb->margins_screen_left + + xmb->icon_spacing_horizontal + + xmb->icon_spacing_horizontal * 4 - xmb->icon_size / 4, + xmb->margins_screen_top + xmb->icon_size + xmb->savestate_thumbnail_height, xmb->savestate_thumbnail_width, xmb->savestate_thumbnail_height, xmb->savestate_thumbnail); else if (xmb->thumbnail @@ -2884,9 +2830,9 @@ static void xmb_frame(void *data, video_frame_info_t *video_info) xmb_draw_thumbnail(menu_disp_info, xmb, &coord_white[0], width, height, - xmb->margins.screen.left + xmb->icon.spacing.horizontal + - xmb->icon.spacing.horizontal*4 - xmb->icon.size / 4, - xmb->margins.screen.top + xmb->icon.size + xmb->thumbnail_height, + xmb->margins_screen_left + xmb->icon_spacing_horizontal + + xmb->icon_spacing_horizontal*4 - xmb->icon_size / 4, + xmb->margins_screen_top + xmb->icon_size + xmb->thumbnail_height, xmb->thumbnail_width, xmb->thumbnail_height, xmb->thumbnail); } @@ -2916,18 +2862,18 @@ static void xmb_frame(void *data, video_frame_info_t *video_info) if (percent > 0) { - size_t x_pos = xmb->icon.size / 6; - size_t x_pos_icon = xmb->margins.title.left; + size_t x_pos = xmb->icon_size / 6; + size_t x_pos_icon = xmb->margins_title_left; if (coord_white[3] != 0) xmb_draw_icon( menu_disp_info, - xmb->icon.size, + xmb->icon_size, &mymat, xmb->textures.list[charging ? XMB_TEXTURE_BATTERY_CHARGING : XMB_TEXTURE_BATTERY_FULL], - width - (xmb->icon.size / 2) - x_pos_icon, - xmb->icon.size, + width - (xmb->icon_size / 2) - x_pos_icon, + xmb->icon_size, width, height, 1, @@ -2941,8 +2887,8 @@ static void xmb_frame(void *data, video_frame_info_t *video_info) percent_width = (unsigned)font_driver_get_message_width(xmb->font, msg, (unsigned)strlen(msg), 1); xmb_draw_text(menu_disp_info, xmb, msg, - width - xmb->margins.title.left - x_pos, - xmb->margins.title.top, 1, 1, TEXT_ALIGN_RIGHT, + width - xmb->margins_title_left - x_pos, + xmb->margins_title_top, 1, 1, TEXT_ALIGN_RIGHT, width, height, xmb->font); } } @@ -2958,15 +2904,16 @@ static void xmb_frame(void *data, video_frame_info_t *video_info) int x_pos = 0; if (percent_width) - x_pos = percent_width + (xmb->icon.size / 2.5); + x_pos = percent_width + (xmb->icon_size / 2.5); xmb_draw_icon( menu_disp_info, - xmb->icon.size, + xmb->icon_size, &mymat, xmb->textures.list[XMB_TEXTURE_CLOCK], - width - xmb->icon.size - x_pos, - xmb->icon.size,width, + width - xmb->icon_size - x_pos, + xmb->icon_size, + width, height, 1, 0, @@ -2984,31 +2931,31 @@ static void xmb_frame(void *data, video_frame_info_t *video_info) menu_display_timedate(&datetime); if (percent_width) - x_pos = percent_width + (xmb->icon.size / 2.5); + x_pos = percent_width + (xmb->icon_size / 2.5); xmb_draw_text(menu_disp_info, xmb, timedate, - width - xmb->margins.title.left - xmb->icon.size / 4 - x_pos, - xmb->margins.title.top, 1, 1, TEXT_ALIGN_RIGHT, + width - xmb->margins_title_left - xmb->icon_size / 4 - x_pos, + xmb->margins_title_top, 1, 1, TEXT_ALIGN_RIGHT, width, height, xmb->font); } /* Arrow image */ - menu_display_set_alpha(coord_white, MIN(xmb->textures.arrow.alpha, xmb->alpha)); + menu_display_set_alpha(coord_white, MIN(xmb->textures_arrow_alpha, xmb->alpha)); if (coord_white[3] != 0) xmb_draw_icon( menu_disp_info, - xmb->icon.size, + xmb->icon_size, &mymat, xmb->textures.list[XMB_TEXTURE_ARROW], - xmb->x + xmb->margins.screen.left + - xmb->icon.spacing.horizontal - xmb->icon.size / 2.0 + xmb->icon.size, - xmb->margins.screen.top + - xmb->icon.size / 2.0 + xmb->icon.spacing.vertical + xmb->x + xmb->margins_screen_left + + xmb->icon_spacing_horizontal - xmb->icon_size / 2.0 + xmb->icon_size, + xmb->margins_screen_top + + xmb->icon_size / 2.0 + xmb->icon_spacing_vertical * xmb->active_item_factor, width, height, - xmb->textures.arrow.alpha, + xmb->textures_arrow_alpha, 0, 1, &coord_white[0], @@ -3032,10 +2979,10 @@ static void xmb_frame(void *data, video_frame_info_t *video_info) menu_display_ctx_rotate_draw_t rotate_draw; math_matrix_4x4 mymat; uintptr_t texture = node->icon; - float x = xmb->x + xmb->categories.x_pos + - xmb->margins.screen.left + - xmb->icon.spacing.horizontal * (i + 1) - xmb->icon.size / 2.0; - float y = xmb->margins.screen.top + xmb->icon.size / 2.0; + float x = xmb->x + xmb->categories_x_pos + + xmb->margins_screen_left + + xmb->icon_spacing_horizontal * (i + 1) - xmb->icon_size / 2.0; + float y = xmb->margins_screen_top + xmb->icon_size / 2.0; float rotation = 0; float scale_factor = node->zoom; @@ -3050,7 +2997,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info) xmb_draw_icon( menu_disp_info, - xmb->icon.size, + xmb->icon_size, &mymat, texture, x, @@ -3076,7 +3023,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info) xmb->selection_buf_old, xmb->selection_ptr_old, (xmb_list_get_size(xmb, MENU_LIST_PLAIN) > 1) - ? xmb->categories.selection_ptr : xmb->categories.selection_ptr_old, + ? xmb->categories_selection_ptr : xmb->categories_selection_ptr_old, &item_color[0], width, height); @@ -3090,7 +3037,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info) xmb, selection_buf, selection, - xmb->categories.selection_ptr, + xmb->categories_selection_ptr, &item_color[0], width, height); @@ -3131,7 +3078,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info) menu_display_set_alpha(coord_white, MIN(xmb->alpha, 1.00f)); menu_display_draw_cursor( &coord_white[0], - xmb->cursor.size, + xmb->cursor_size, xmb->textures.list[XMB_TEXTURE_POINTER], menu_input_mouse_state(MENU_MOUSE_X_AXIS), menu_input_mouse_state(MENU_MOUSE_Y_AXIS), @@ -3155,15 +3102,15 @@ static void xmb_layout_ps3(xmb_handle_t *xmb, int width) xmb->active_item_factor = 3.0; xmb->under_item_offset = 5.0; - xmb->categories.active.zoom = 1.0; - xmb->categories.passive.zoom = 0.5; - xmb->items.active.zoom = 1.0; - xmb->items.passive.zoom = 0.5; + xmb->categories_active_zoom = 1.0; + xmb->categories_passive_zoom = 0.5; + xmb->items_active_zoom = 1.0; + xmb->items_passive_zoom = 0.5; - xmb->categories.active.alpha = 1.0; - xmb->categories.passive.alpha = 0.85; - xmb->items.active.alpha = 1.0; - xmb->items.passive.alpha = 0.85; + xmb->categories_active_alpha = 1.0; + xmb->categories_passive_alpha = 0.85; + xmb->items_active_alpha = 1.0; + xmb->items_passive_alpha = 0.85; xmb->shadow_offset = 2.0; @@ -3174,41 +3121,41 @@ static void xmb_layout_ps3(xmb_handle_t *xmb, int width) xmb->thumbnail_width = 460.0 * scale_factor; xmb->savestate_thumbnail_width= 460.0 * scale_factor; - xmb->cursor.size = 64.0; + xmb->cursor_size = 64.0; - xmb->icon.spacing.horizontal = 200.0 * scale_factor; - xmb->icon.spacing.vertical = 64.0 * scale_factor; + xmb->icon_spacing_horizontal = 200.0 * scale_factor; + xmb->icon_spacing_vertical = 64.0 * scale_factor; - xmb->margins.screen.top = (256+32) * scale_factor; - xmb->margins.screen.left = 336.0 * scale_factor; + xmb->margins_screen_top = (256+32) * scale_factor; + xmb->margins_screen_left = 336.0 * scale_factor; - xmb->margins.title.left = 60 * scale_factor; - xmb->margins.title.top = 60 * scale_factor + new_font_size / 3; - xmb->margins.title.bottom = 60 * scale_factor - new_font_size / 3; + xmb->margins_title_left = 60 * scale_factor; + xmb->margins_title_top = 60 * scale_factor + new_font_size / 3; + xmb->margins_title_bottom = 60 * scale_factor - new_font_size / 3; - xmb->margins.label.left = 85.0 * scale_factor; - xmb->margins.label.top = new_font_size / 3.0; + xmb->margins_label_left = 85.0 * scale_factor; + xmb->margins_label_top = new_font_size / 3.0; - xmb->margins.setting.left = 600.0 * scale_factor; - xmb->margins.dialog = 48 * scale_factor; + xmb->margins_setting_left = 600.0 * scale_factor; + xmb->margins_dialog = 48 * scale_factor; - xmb->margins.slice = 16; + xmb->margins_slice = 16; - xmb->icon.size = 128.0 * scale_factor; + xmb->icon_size = 128.0 * scale_factor; xmb->font_size = new_font_size; #ifdef XMB_DEBUG - RARCH_LOG("[XMB] margin screen left: %.2f\n", xmb->margins.screen.left); - RARCH_LOG("[XMB] margin screen top: %.2f\n", xmb->margins.screen.top); - RARCH_LOG("[XMB] margin title left: %.2f\n", xmb->margins.title.left); - RARCH_LOG("[XMB] margin title top: %.2f\n", xmb->margins.title.top); - RARCH_LOG("[XMB] margin title bott: %.2f\n", xmb->margins.title.bottom); - RARCH_LOG("[XMB] margin label left: %.2f\n", xmb->margins.label.left); - RARCH_LOG("[XMB] margin label top: %.2f\n", xmb->margins.label.top); - RARCH_LOG("[XMB] margin sett left: %.2f\n", xmb->margins.setting.left); - RARCH_LOG("[XMB] icon spacing hor: %.2f\n", xmb->icon.spacing.horizontal); - RARCH_LOG("[XMB] icon spacing ver: %.2f\n", xmb->icon.spacing.vertical); - RARCH_LOG("[XMB] icon size: %.2f\n", xmb->icon.size); + RARCH_LOG("[XMB] margin screen left: %.2f\n", xmb->margins_screen_left); + RARCH_LOG("[XMB] margin screen top: %.2f\n", xmb->margins_screen_top); + RARCH_LOG("[XMB] margin title left: %.2f\n", xmb->margins_title_left); + RARCH_LOG("[XMB] margin title top: %.2f\n", xmb->margins_title_top); + RARCH_LOG("[XMB] margin title bott: %.2f\n", xmb->margins_title_bottom); + RARCH_LOG("[XMB] margin label left: %.2f\n", xmb->margins_label_left); + RARCH_LOG("[XMB] margin label top: %.2f\n", xmb->margins_label_top); + RARCH_LOG("[XMB] margin sett left: %.2f\n", xmb->margins_setting_left); + RARCH_LOG("[XMB] icon spacing hor: %.2f\n", xmb->icon_spacing_horizontal); + RARCH_LOG("[XMB] icon spacing ver: %.2f\n", xmb->icon_spacing_vertical); + RARCH_LOG("[XMB] icon size: %.2f\n", xmb->icon_size); #endif menu_display_set_header_height(new_header_height); @@ -3230,54 +3177,54 @@ static void xmb_layout_psp(xmb_handle_t *xmb, int width) xmb->active_item_factor = 2.0; xmb->under_item_offset = 3.0; - xmb->categories.active.zoom = 1.0; - xmb->categories.passive.zoom = 1.0; - xmb->items.active.zoom = 1.0; - xmb->items.passive.zoom = 1.0; + xmb->categories_active_zoom = 1.0; + xmb->categories_passive_zoom = 1.0; + xmb->items_active_zoom = 1.0; + xmb->items_passive_zoom = 1.0; - xmb->categories.active.alpha = 1.0; - xmb->categories.passive.alpha = 0.85; - xmb->items.active.alpha = 1.0; - xmb->items.passive.alpha = 0.85; + xmb->categories_active_alpha = 1.0; + xmb->categories_passive_alpha = 0.85; + xmb->items_active_alpha = 1.0; + xmb->items_passive_alpha = 0.85; xmb->shadow_offset = 1.0; new_font_size = 32.0 * scale_factor; xmb->font2_size = 24.0 * scale_factor; new_header_height = 128.0 * scale_factor; - xmb->margins.screen.top = (256+32) * scale_factor; + xmb->margins_screen_top = (256+32) * scale_factor; xmb->thumbnail_width = 460.0 * scale_factor; xmb->savestate_thumbnail_width= 460.0 * scale_factor; - xmb->cursor.size = 64.0; + xmb->cursor_size = 64.0; - xmb->icon.spacing.horizontal = 250.0 * scale_factor; - xmb->icon.spacing.vertical = 108.0 * scale_factor; + xmb->icon_spacing_horizontal = 250.0 * scale_factor; + xmb->icon_spacing_vertical = 108.0 * scale_factor; - xmb->margins.screen.left = 136.0 * scale_factor; - xmb->margins.title.left = 60 * scale_factor; - xmb->margins.title.top = 60 * scale_factor + new_font_size / 3; - xmb->margins.title.bottom = 60 * scale_factor - new_font_size / 3; - xmb->margins.label.left = 85.0 * scale_factor; - xmb->margins.label.top = new_font_size / 3.0; - xmb->margins.setting.left = 600.0 * scale_factor; - xmb->margins.dialog = 48 * scale_factor; - xmb->margins.slice = 16; - xmb->icon.size = 128.0 * scale_factor; + xmb->margins_screen_left = 136.0 * scale_factor; + xmb->margins_title_left = 60 * scale_factor; + xmb->margins_title_top = 60 * scale_factor + new_font_size / 3; + xmb->margins_title_bottom = 60 * scale_factor - new_font_size / 3; + xmb->margins_label_left = 85.0 * scale_factor; + xmb->margins_label_top = new_font_size / 3.0; + xmb->margins_setting_left = 600.0 * scale_factor; + xmb->margins_dialog = 48 * scale_factor; + xmb->margins_slice = 16; + xmb->icon_size = 128.0 * scale_factor; xmb->font_size = new_font_size; #ifdef XMB_DEBUG - RARCH_LOG("[XMB] margin screen left: %.2f\n", xmb->margins.screen.left); - RARCH_LOG("[XMB] margin screen top: %.2f\n", xmb->margins.screen.top); - RARCH_LOG("[XMB] margin title left: %.2f\n", xmb->margins.title.left); - RARCH_LOG("[XMB] margin title top: %.2f\n", xmb->margins.title.top); - RARCH_LOG("[XMB] margin title bott: %.2f\n", xmb->margins.title.bottom); - RARCH_LOG("[XMB] margin label left: %.2f\n", xmb->margins.label.left); - RARCH_LOG("[XMB] margin label top: %.2f\n", xmb->margins.label.top); - RARCH_LOG("[XMB] margin sett left: %.2f\n", xmb->margins.setting.left); - RARCH_LOG("[XMB] icon spacing hor: %.2f\n", xmb->icon.spacing.horizontal); - RARCH_LOG("[XMB] icon spacing ver: %.2f\n", xmb->icon.spacing.vertical); - RARCH_LOG("[XMB] icon size: %.2f\n", xmb->icon.size); + RARCH_LOG("[XMB] margin screen left: %.2f\n", xmb->margins_screen_left); + RARCH_LOG("[XMB] margin screen top: %.2f\n", xmb->margins_screen_top); + RARCH_LOG("[XMB] margin title left: %.2f\n", xmb->margins_title_left); + RARCH_LOG("[XMB] margin title top: %.2f\n", xmb->margins_title_top); + RARCH_LOG("[XMB] margin title bott: %.2f\n", xmb->margins_title_bottom); + RARCH_LOG("[XMB] margin label left: %.2f\n", xmb->margins_label_left); + RARCH_LOG("[XMB] margin label top: %.2f\n", xmb->margins_label_top); + RARCH_LOG("[XMB] margin sett left: %.2f\n", xmb->margins_setting_left); + RARCH_LOG("[XMB] icon spacing hor: %.2f\n", xmb->icon_spacing_horizontal); + RARCH_LOG("[XMB] icon spacing ver: %.2f\n", xmb->icon_spacing_vertical); + RARCH_LOG("[XMB] icon size: %.2f\n", xmb->icon_size); #endif menu_display_set_header_height(new_header_height); @@ -3302,8 +3249,8 @@ static void xmb_layout(xmb_handle_t *xmb) for (i = 0; i < end; i++) { - float ia = xmb->items.passive.alpha; - float iz = xmb->items.passive.zoom; + float ia = xmb->items_passive_alpha; + float iz = xmb->items_passive_zoom; xmb_node_t *node = (xmb_node_t*)menu_entries_get_userdata_at_offset( selection_buf, i); @@ -3312,8 +3259,8 @@ static void xmb_layout(xmb_handle_t *xmb) if (i == current) { - ia = xmb->items.active.alpha; - iz = xmb->items.active.alpha; + ia = xmb->items_active_alpha; + iz = xmb->items_active_alpha; } node->alpha = ia; @@ -3330,8 +3277,8 @@ static void xmb_layout(xmb_handle_t *xmb) for (i = 0; i < end; i++) { - float ia = 0; - float iz = xmb->items.passive.zoom; + float ia = 0; + float iz = xmb->items_passive_zoom; xmb_node_t *node = (xmb_node_t*)menu_entries_get_userdata_at_offset( xmb->selection_buf_old, i); @@ -3340,15 +3287,15 @@ static void xmb_layout(xmb_handle_t *xmb) if (i == current) { - ia = xmb->items.active.alpha; - iz = xmb->items.active.alpha; + ia = xmb->items_active_alpha; + iz = xmb->items_active_alpha; } node->alpha = ia; node->label_alpha = 0; node->zoom = iz; node->y = xmb_item_y(xmb, i, current); - node->x = xmb->icon.size * 1 * -2; + node->x = xmb->icon_size * 1 * -2; } } @@ -3422,14 +3369,14 @@ static void *xmb_init(void **userdata, bool video_is_threaded) if (!xmb->selection_buf_old) goto error; - xmb->categories.active.idx = 0; - xmb->categories.active.idx_old = 0; - xmb->x = 0; - xmb->categories.x_pos = 0; - xmb->textures.arrow.alpha = 0; - xmb->depth = 1; - xmb->old_depth = 1; - xmb->alpha = 0; + xmb->categories_active_idx = 0; + xmb->categories_active_idx_old = 0; + xmb->x = 0; + xmb->categories_x_pos = 0; + xmb->textures_arrow_alpha = 0; + xmb->depth = 1; + xmb->old_depth = 1; + xmb->alpha = 0; xmb->system_tab_end = 0; xmb->tabs[xmb->system_tab_end] = XMB_SYSTEM_TAB_MAIN; @@ -3714,45 +3661,45 @@ static void xmb_context_reset_textures( menu_display_allocate_white_texture(); xmb->main_menu_node.icon = xmb->textures.list[XMB_TEXTURE_MAIN_MENU]; - xmb->main_menu_node.alpha = xmb->categories.active.alpha; - xmb->main_menu_node.zoom = xmb->categories.active.zoom; + xmb->main_menu_node.alpha = xmb->categories_active_alpha; + xmb->main_menu_node.zoom = xmb->categories_active_zoom; xmb->settings_tab_node.icon = xmb->textures.list[XMB_TEXTURE_SETTINGS]; - xmb->settings_tab_node.alpha = xmb->categories.active.alpha; - xmb->settings_tab_node.zoom = xmb->categories.active.zoom; + xmb->settings_tab_node.alpha = xmb->categories_active_alpha; + xmb->settings_tab_node.zoom = xmb->categories_active_zoom; xmb->history_tab_node.icon = xmb->textures.list[XMB_TEXTURE_HISTORY]; - xmb->history_tab_node.alpha = xmb->categories.active.alpha; - xmb->history_tab_node.zoom = xmb->categories.active.zoom; + xmb->history_tab_node.alpha = xmb->categories_active_alpha; + xmb->history_tab_node.zoom = xmb->categories_active_zoom; xmb->favorites_tab_node.icon = xmb->textures.list[XMB_TEXTURE_FAVORITES]; - xmb->favorites_tab_node.alpha = xmb->categories.active.alpha; - xmb->favorites_tab_node.zoom = xmb->categories.active.zoom; + xmb->favorites_tab_node.alpha = xmb->categories_active_alpha; + xmb->favorites_tab_node.zoom = xmb->categories_active_zoom; xmb->music_tab_node.icon = xmb->textures.list[XMB_TEXTURE_MUSICS]; - xmb->music_tab_node.alpha = xmb->categories.active.alpha; - xmb->music_tab_node.zoom = xmb->categories.active.zoom; + xmb->music_tab_node.alpha = xmb->categories_active_alpha; + xmb->music_tab_node.zoom = xmb->categories_active_zoom; #ifdef HAVE_FFMPEG xmb->video_tab_node.icon = xmb->textures.list[XMB_TEXTURE_MOVIES]; - xmb->video_tab_node.alpha = xmb->categories.active.alpha; - xmb->video_tab_node.zoom = xmb->categories.active.zoom; + xmb->video_tab_node.alpha = xmb->categories_active_alpha; + xmb->video_tab_node.zoom = xmb->categories_active_zoom; #endif #ifdef HAVE_IMAGEVIEWER xmb->images_tab_node.icon = xmb->textures.list[XMB_TEXTURE_IMAGES]; - xmb->images_tab_node.alpha = xmb->categories.active.alpha; - xmb->images_tab_node.zoom = xmb->categories.active.zoom; + xmb->images_tab_node.alpha = xmb->categories_active_alpha; + xmb->images_tab_node.zoom = xmb->categories_active_zoom; #endif xmb->add_tab_node.icon = xmb->textures.list[XMB_TEXTURE_ADD]; - xmb->add_tab_node.alpha = xmb->categories.active.alpha; - xmb->add_tab_node.zoom = xmb->categories.active.zoom; + xmb->add_tab_node.alpha = xmb->categories_active_alpha; + xmb->add_tab_node.zoom = xmb->categories_active_zoom; #ifdef HAVE_NETWORKING - xmb->netplay_tab_node.icon = xmb->textures.list[XMB_TEXTURE_NETPLAY]; - xmb->netplay_tab_node.alpha = xmb->categories.active.alpha; - xmb->netplay_tab_node.zoom = xmb->categories.active.zoom; + xmb->netplay_tab_node.icon = xmb->textures.list[XMB_TEXTURE_NETPLAY]; + xmb->netplay_tab_node.alpha = xmb->categories_active_alpha; + xmb->netplay_tab_node.zoom = xmb->categories_active_zoom; #endif } @@ -3877,17 +3824,17 @@ static void xmb_list_insert(void *userdata, node->fullpath = strdup(fullpath); } - node->alpha = xmb->items.passive.alpha; - node->zoom = xmb->items.passive.zoom; + node->alpha = xmb->items_passive_alpha; + node->zoom = xmb->items_passive_zoom; node->label_alpha = node->alpha; node->y = xmb_item_y(xmb, i, current); node->x = 0; if (i == current) { - node->alpha = xmb->items.active.alpha; - node->label_alpha = xmb->items.active.alpha; - node->zoom = xmb->items.active.alpha; + node->alpha = xmb->items_active_alpha; + node->label_alpha = xmb->items_active_alpha; + node->zoom = xmb->items_active_alpha; } file_list_set_userdata(list, i, node); @@ -3994,27 +3941,27 @@ static void xmb_list_cache(void *data, enum menu_list_type type, unsigned action case MENU_LIST_PLAIN: break; case MENU_LIST_HORIZONTAL: - xmb->categories.selection_ptr_old = xmb->categories.selection_ptr; + xmb->categories_selection_ptr_old = xmb->categories_selection_ptr; switch (action) { case MENU_ACTION_LEFT: - if (xmb->categories.selection_ptr == 0) + if (xmb->categories_selection_ptr == 0) { - xmb->categories.selection_ptr = list_size; - xmb->categories.active.idx = (unsigned)(list_size - 1); + xmb->categories_selection_ptr = list_size; + xmb->categories_active_idx = (unsigned)(list_size - 1); } else - xmb->categories.selection_ptr--; + xmb->categories_selection_ptr--; break; default: - if (xmb->categories.selection_ptr == list_size) + if (xmb->categories_selection_ptr == list_size) { - xmb->categories.selection_ptr = 0; - xmb->categories.active.idx = 1; + xmb->categories_selection_ptr = 0; + xmb->categories_active_idx = 1; } else - xmb->categories.selection_ptr++; + xmb->categories_selection_ptr++; break; } @@ -4024,7 +3971,7 @@ static void xmb_list_cache(void *data, enum menu_list_type type, unsigned action free(menu_stack->list[stack_size - 1].label); menu_stack->list[stack_size - 1].label = NULL; - switch (xmb_get_system_tab(xmb, (unsigned)xmb->categories.selection_ptr)) + switch (xmb_get_system_tab(xmb, (unsigned)xmb->categories_selection_ptr)) { case XMB_SYSTEM_TAB_MAIN: menu_stack->list[stack_size - 1].label =