git.y1.nz

SameBoy

Accurate GB/GBC emulator
download: https://git.y1.nz/archives/sameboy.tar.gz
README | Files | Log | Refs | LICENSE

commit 479c16e698dcabbb954a4dff7ed0a326c31d4677
parent aaba172c02129fc07b5e363dfa4969b361042f27
Author: Lior Halphon <LIJI32@gmail.com>
Date:   Tue, 11 Apr 2023 12:30:05 +0300

Try a better hint

Diffstat:
MCore/save_state.h4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Core/save_state.h b/Core/save_state.h @@ -15,11 +15,11 @@ #define GB_SECTION(name, ...) _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wpedantic\"") alignas(8) char _align_##name[0]; __VA_ARGS__ _Pragma("GCC diagnostic pop") #endif #else -#define GB_SECTION(name, ...) union __attribute__ ((aligned (8))) {uint8_t name##_section_start[0]; struct {__VA_ARGS__};}; uint8_t name##_section_end[0]; +#define GB_SECTION(name, ...) union __attribute__ ((aligned (8))) {uint8_t name##_section_start; struct {__VA_ARGS__};}; uint8_t name##_section_end[0]; #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) ((void*)&((gb)->name##_section_start)) +#define GB_GET_SECTION(gb, name) ((uint8_t (*)[GB_SECTION_SIZE(name)])&((gb)->name##_section_start)) #endif #endif

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.