Include stdbool.h when using Visual Studio 2017+

Also cleaned up some incorrect return values from bool functions.
This commit is contained in:
Sam Lantinga 2024-10-01 09:57:05 -07:00
parent 522321b7c9
commit 4fa92d233d
9 changed files with 17 additions and 16 deletions

View file

@ -46,6 +46,7 @@
#ifndef __cplusplus
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \
(defined(_MSC_VER) && (_MSC_VER >= 1910 /* Visual Studio 2017 */)) || \
defined(SDL_INCLUDE_STDBOOL_H)
#include <stdbool.h>
#elif !defined(__bool_true_false_are_defined) && !defined(bool)