瀏覽代碼

Fixed SDL_DEFINE_STDBOOL logic if __bool_true_false_are_defined is defined

Sam Lantinga 1 年之前
父節點
當前提交
ea640894d3
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      include/SDL3/SDL_stdinc.h

+ 3 - 1
include/SDL3/SDL_stdinc.h

@@ -44,11 +44,13 @@
 #endif
 #include <stdarg.h>
 #ifndef __cplusplus
-#if defined(SDL_DEFINE_STDBOOL) && !defined(__bool_true_false_are_defined)
+#ifdef SDL_DEFINE_STDBOOL
+#ifndef __bool_true_false_are_defined
 #define __bool_true_false_are_defined 1
 #define bool  int8_t
 #define false 0
 #define true  1
+#endif
 #else
 #include <stdbool.h>
 #endif