One last attempt

This commit is contained in:
Lior Halphon 2023-04-11 12:33:10 +03:00
parent 479c16e698
commit 4421dedbb9
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@
#ifdef GB_INTERNAL
#define GB_SECTION_OFFSET(name) (offsetof(GB_gameboy_t, name##_section_start))
#define GB_SECTION_SIZE(name) (offsetof(GB_gameboy_t, name##_section_end) - offsetof(GB_gameboy_t, name##_section_start))
#define GB_GET_SECTION(gb, name) ((uint8_t (*)[GB_SECTION_SIZE(name)])&((gb)->name##_section_start))
#define GB_GET_SECTION(gb, name) (void *)((uint8_t *)(gb) + GB_SECTION_OFFSET(name))
#endif
#endif