From abbaa9f6f94b6b4fe831fc2354d0389b2d59d510 Mon Sep 17 00:00:00 2001 From: Lam Wei Lun Date: Sun, 26 Apr 2026 04:20:17 +0800 Subject: [PATCH] Copy same change to rgestures.h and rlgl.h --- src/rgestures.h | 5 ++++- src/rlgl.h | 8 +++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/rgestures.h b/src/rgestures.h index bb51d72ee..734d33f0f 100644 --- a/src/rgestures.h +++ b/src/rgestures.h @@ -59,10 +59,13 @@ // NOTE: Below types are required for standalone usage //---------------------------------------------------------------------------------- // Boolean type +#if !defined(__cplusplus) #if (defined(__STDC__) && __STDC_VERSION__ >= 199901L) || (defined(_MSC_VER) && _MSC_VER >= 1800) #include -#elif !defined(__cplusplus) && !defined(bool) && !defined(RL_BOOL_TYPE) +#elif !defined(bool) typedef enum bool { false = 0, true = !false } bool; + #define RL_BOOL_TYPE +#endif #endif #if !defined(RL_VECTOR2_TYPE) diff --git a/src/rlgl.h b/src/rlgl.h index 5c6e95afb..c778f4b00 100644 --- a/src/rlgl.h +++ b/src/rlgl.h @@ -358,11 +358,13 @@ //---------------------------------------------------------------------------------- // Types and Structures Definition //---------------------------------------------------------------------------------- +#if !defined(__cplusplus) #if (defined(__STDC__) && __STDC_VERSION__ >= 199901L) || (defined(_MSC_VER) && _MSC_VER >= 1800) #include -#elif !defined(__cplusplus) && !defined(bool) && !defined(RL_BOOL_TYPE) - // Boolean type -typedef enum bool { false = 0, true = !false } bool; +#elif !defined(bool) + typedef enum bool { false = 0, true = !false } bool; + #define RL_BOOL_TYPE +#endif #endif #if !defined(RL_MATRIX_TYPE)