mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 03:18:13 +00:00
Provide a definition of bool if needed for your environment
This commit is contained in:
@@ -34,13 +34,25 @@
|
|||||||
|
|
||||||
#include <SDL3/SDL_platform_defines.h>
|
#include <SDL3/SDL_platform_defines.h>
|
||||||
|
|
||||||
|
/* Most everything except Visual Studio 2013 and earlier has stdbool.h now */
|
||||||
|
#if defined(_MSC_VER) && (_MSC_VER < 1910)
|
||||||
|
#define SDL_DEFINE_STDBOOL
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#endif
|
#endif
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
|
#if defined(SDL_DEFINE_STDBOOL) && !defined(__bool_true_false_are_defined)
|
||||||
|
#define __bool_true_false_are_defined 1
|
||||||
|
#define bool int8_t
|
||||||
|
#define false 0
|
||||||
|
#define true 1
|
||||||
|
#else
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
|
Reference in New Issue
Block a user