From 95854b5686a881c486c93961364dcc04434b8cb5 Mon Sep 17 00:00:00 2001 From: Lam Wei Lun Date: Sun, 26 Apr 2026 04:14:44 +0800 Subject: [PATCH] Shifts __cplusplus check to a higher level for bool define --- src/raylib.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/raylib.h b/src/raylib.h index 825867a70..7611f8ae7 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -203,12 +203,14 @@ // Types and Structures Definition //---------------------------------------------------------------------------------- // Boolean type -#if (defined(__STDC__) && (defined(__STDC_VERSION__) && __STDC_VERSION__) >= 199901L) || (defined(_MSC_VER) && _MSC_VER >= 1800) +#if !defined(__cplusplus) +#if (defined(__STDC__) && __STDC_VERSION__ >= 199901L) || (defined(_MSC_VER) && _MSC_VER >= 1800) #include -#elif !defined(__cplusplus) && !defined(bool) +#elif !defined(bool) typedef enum bool { false = 0, true = !false } bool; #define RL_BOOL_TYPE #endif +#endif // Vector2, 2 components typedef struct Vector2 {