(XMB) Fix context reset/destroy

This commit is contained in:
Higor Eurípedes 2015-06-09 22:04:46 -03:00
parent bd45e4299d
commit 5b3efee2e0

View File

@ -1632,23 +1632,23 @@ static void xmb_context_reset_horizontal_list(xmb_handle_t *xmb,
unsigned i;
size_t list_size = xmb_list_get_size(menu, MENU_LIST_HORIZONTAL);
for (i = 1; i < list_size; i++)
for (i = 0; i < list_size; i++)
{
char iconpath[PATH_MAX_LENGTH], sysname[PATH_MAX_LENGTH];
char texturepath[PATH_MAX_LENGTH], content_texturepath[PATH_MAX_LENGTH];
struct texture_image ti = {0};
xmb_node_t *node = xmb_get_userdata_from_horizontal_list(
xmb, i - 1);
xmb, i);
struct item_file *info = NULL;
if (!node)
{
node = xmb_node_allocate_userdata(xmb, i - 1);
node = xmb_node_allocate_userdata(xmb, i);
if (!node)
continue;
}
info = (struct item_file*)&xmb->horizontal_list->list[i - 1];
info = (struct item_file*)&xmb->horizontal_list->list[i];
if (!info)
continue;
@ -1990,9 +1990,9 @@ static void xmb_context_destroy_horizontal_list(xmb_handle_t *xmb,
unsigned i;
size_t list_size = xmb_list_get_size(menu, MENU_LIST_HORIZONTAL);
for (i = 1; i < list_size; i++)
for (i = 0; i < list_size; i++)
{
xmb_node_t *node = xmb_get_userdata_from_horizontal_list(xmb, i - 1);
xmb_node_t *node = xmb_get_userdata_from_horizontal_list(xmb, i);
if (!node)
continue;