From 4fbae0d4c9f4deb6bc685fb703653fb8449dacc1 Mon Sep 17 00:00:00 2001 From: Jademalo <386846+Jademalo@users.noreply.github.com> Date: Fri, 22 Oct 2021 04:44:46 +0100 Subject: Improve IDE Support --- include/global.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/global.h b/include/global.h index 3a26a2c3e..10682ecb2 100644 --- a/include/global.h +++ b/include/global.h @@ -9,7 +9,7 @@ #include "constants/global.h" // IDE support -#if defined(__APPLE__) || defined(__CYGWIN__) +#if defined (__APPLE__) || defined (__CYGWIN__) || defined (__INTELLISENSE__) #define _(x) x #define __(x) x #define INCBIN(x) {0} @@ -19,7 +19,7 @@ #define INCBIN_S8 INCBIN #define INCBIN_S16 INCBIN #define INCBIN_S32 INCBIN -#endif +#endif // IDE support // For debug menu translations. // DTR("こんにちは", "Hello") will expand to "Hello" with DEBUG_FIX, -- cgit v1.2.3 From 9ed24500acf517b3ab0138817875e96757e0032c Mon Sep 17 00:00:00 2001 From: Jademalo <386846+Jademalo@users.noreply.github.com> Date: Sat, 23 Oct 2021 10:10:08 +0100 Subject: IDE support formatting and consistency --- include/global.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/include/global.h b/include/global.h index 10682ecb2..78d63bb78 100644 --- a/include/global.h +++ b/include/global.h @@ -9,16 +9,17 @@ #include "constants/global.h" // IDE support -#if defined (__APPLE__) || defined (__CYGWIN__) || defined (__INTELLISENSE__) -#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 +#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 // For debug menu translations. -- cgit v1.2.3