mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-23 19:30:45 +00:00
(xmb) De-hardcode the size of 'tabs' array
As per @bparker06's recommendation. First element of the enum is forced to be zero, so we can add a tail to the enum that we can use to query its max length.
This commit is contained in:
parent
7d2e9290e2
commit
0d7f9c7cf0
@ -169,7 +169,10 @@ enum
|
|||||||
#ifdef HAVE_NETWORKING
|
#ifdef HAVE_NETWORKING
|
||||||
XMB_SYSTEM_TAB_NETPLAY,
|
XMB_SYSTEM_TAB_NETPLAY,
|
||||||
#endif
|
#endif
|
||||||
XMB_SYSTEM_TAB_ADD
|
XMB_SYSTEM_TAB_ADD,
|
||||||
|
|
||||||
|
/* End of this enum - use the last one to determine num of possible tabs */
|
||||||
|
XMB_SYSTEM_TAB_MAX_LENGTH
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct xmb_handle
|
typedef struct xmb_handle
|
||||||
@ -177,7 +180,7 @@ typedef struct xmb_handle
|
|||||||
bool mouse_show;
|
bool mouse_show;
|
||||||
|
|
||||||
uint8_t system_tab_end;
|
uint8_t system_tab_end;
|
||||||
uint8_t tabs[16];
|
uint8_t tabs[XMB_SYSTEM_TAB_MAX_LENGTH];
|
||||||
|
|
||||||
int depth;
|
int depth;
|
||||||
int old_depth;
|
int old_depth;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user