sgb.h: Use GB_INTERNAL to hide internal struct data

Silences warnings in downstream projects that use a different language standard
when including gb.h.

sgb.h:14:9: warning: anonymous structs are a GNU extension [-Wgnu-anonymous-struct]
        struct {
        ^
sgb.h:14:9: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]
        struct {
        ^
This commit is contained in:
orbea 2022-01-14 15:26:11 -08:00
parent eaeeb49612
commit 7c9ab0fd46

View File

@ -7,6 +7,7 @@
typedef struct GB_sgb_s GB_sgb_t;
typedef struct {
uint8_t tiles[0x100 * 8 * 4];
#ifdef GB_INTERNAL
union {
struct {
uint16_t map[32 * 32];
@ -14,6 +15,9 @@ typedef struct {
};
uint16_t raw_data[0x440];
};
#else
uint16_t raw_data[0x440];
#endif
} GB_sgb_border_t;
#ifdef GB_INTERNAL