mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 06:44:27 +00:00
(XMB) Fix context reset/destroy
This commit is contained in:
parent
bd45e4299d
commit
5b3efee2e0
@ -1632,23 +1632,23 @@ static void xmb_context_reset_horizontal_list(xmb_handle_t *xmb,
|
|||||||
unsigned i;
|
unsigned i;
|
||||||
size_t list_size = xmb_list_get_size(menu, MENU_LIST_HORIZONTAL);
|
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 iconpath[PATH_MAX_LENGTH], sysname[PATH_MAX_LENGTH];
|
||||||
char texturepath[PATH_MAX_LENGTH], content_texturepath[PATH_MAX_LENGTH];
|
char texturepath[PATH_MAX_LENGTH], content_texturepath[PATH_MAX_LENGTH];
|
||||||
struct texture_image ti = {0};
|
struct texture_image ti = {0};
|
||||||
xmb_node_t *node = xmb_get_userdata_from_horizontal_list(
|
xmb_node_t *node = xmb_get_userdata_from_horizontal_list(
|
||||||
xmb, i - 1);
|
xmb, i);
|
||||||
struct item_file *info = NULL;
|
struct item_file *info = NULL;
|
||||||
|
|
||||||
if (!node)
|
if (!node)
|
||||||
{
|
{
|
||||||
node = xmb_node_allocate_userdata(xmb, i - 1);
|
node = xmb_node_allocate_userdata(xmb, i);
|
||||||
if (!node)
|
if (!node)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
info = (struct item_file*)&xmb->horizontal_list->list[i - 1];
|
info = (struct item_file*)&xmb->horizontal_list->list[i];
|
||||||
|
|
||||||
if (!info)
|
if (!info)
|
||||||
continue;
|
continue;
|
||||||
@ -1990,9 +1990,9 @@ static void xmb_context_destroy_horizontal_list(xmb_handle_t *xmb,
|
|||||||
unsigned i;
|
unsigned i;
|
||||||
size_t list_size = xmb_list_get_size(menu, MENU_LIST_HORIZONTAL);
|
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)
|
if (!node)
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user