diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-10-23 09:44:08 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-23 09:44:08 -0400 |
commit | 471608b56abbdf70a452896a0d895ffa5b4b06f9 (patch) | |
tree | 7135294e7beb23c3d10a5e064dbd164c00e69400 | |
parent | 6eaca5f0d02164c97f30babd4f686c66af28abfe (diff) | |
parent | 1c4d5bfed09cd9275caf98db0998958876c091d0 (diff) |
Merge pull request #473 from Jademalo/ide-support
Improve IDE Support
-rw-r--r-- | berry_fix/payload/include/global.h | 23 | ||||
-rw-r--r-- | include/global.h | 25 |
2 files changed, 24 insertions, 24 deletions
diff --git a/berry_fix/payload/include/global.h b/berry_fix/payload/include/global.h index ef161c249..4d9da7c7d 100644 --- a/berry_fix/payload/include/global.h +++ b/berry_fix/payload/include/global.h @@ -6,17 +6,18 @@ // global.h from pokemon ruby // IDE support -#if defined(__APPLE__) || defined(__CYGWIN__) -#define _(x) x -#define __(x) x -#define INCBIN(x) {0} -#define INCBIN_U8 INCBIN -#define INCBIN_U16 INCBIN -#define INCBIN_U32 INCBIN -#define INCBIN_S8 INCBIN -#define INCBIN_S16 INCBIN -#define INCBIN_S32 INCBIN -#endif +#if defined(__APPLE__) || defined(__CYGWIN__) || defined(__INTELLISENSE__) +// We define these when using certain IDEs to fool preproc +#define _(x) (x) +#define __(x) (x) +#define INCBIN(...) {0} +#define INCBIN_U8 INCBIN +#define INCBIN_U16 INCBIN +#define INCBIN_U32 INCBIN +#define INCBIN_S8 INCBIN +#define INCBIN_S16 INCBIN +#define INCBIN_S32 INCBIN +#endif // IDE support // Prevent cross-jump optimization. #define BLOCK_CROSS_JUMP asm(""); diff --git a/include/global.h b/include/global.h index f7abcc23d..d6d57910d 100644 --- a/include/global.h +++ b/include/global.h @@ -16,20 +16,19 @@ #define asm_comment(x) asm volatile("@ -- " x " -- ") #define asm_unified(x) asm(".syntax unified\n" x "\n.syntax divided") -#if defined (__APPLE__) || defined (__CYGWIN__) || defined(__CLION_IDE__) -// Get the IDE to stfu - -// We define it this way to fool preproc. +// IDE support +#if defined(__APPLE__) || defined(__CYGWIN__) || defined(__INTELLISENSE__) +// We define these when using certain IDEs to fool preproc +#define _(x) (x) +#define __(x) (x) #define INCBIN(...) {0} -#define INCBIN_U8 INCBIN -#define INCBIN_U16 INCBIN -#define INCBIN_U32 INCBIN -#define INCBIN_S8 INCBIN -#define INCBIN_S16 INCBIN -#define INCBIN_S32 INCBIN -#define _(x) (x) -#define __(x) (x) -#endif // __APPLE__ +#define INCBIN_U8 INCBIN +#define INCBIN_U16 INCBIN +#define INCBIN_U32 INCBIN +#define INCBIN_S8 INCBIN +#define INCBIN_S16 INCBIN +#define INCBIN_S32 INCBIN +#endif // IDE support #define NELEMS(array) (sizeof(array) / sizeof((array)[0])) |