Use stdbool for glfw boolean types

This commit is contained in:
Kovid Goyal 2019-02-03 10:13:02 +05:30
parent 84caf787aa
commit 9a2ff9e419
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 5 additions and 3 deletions

6
glfw/glfw3.h vendored
View File

@ -133,6 +133,8 @@ extern "C" {
*/
#include <stdint.h>
#include <stdbool.h>
/* Include the chosen OpenGL or OpenGL ES headers.
*/
#if defined(GLFW_INCLUDE_ES1)
@ -277,14 +279,14 @@ extern "C" {
* semantic sugar for the number 1. You can also use `1` or `true` or `_True`
* or `GL_TRUE` or whatever you want.
*/
#define GLFW_TRUE 1
#define GLFW_TRUE true
/*! @brief Zero.
*
* Zero. Seriously. You don't _need_ to use this symbol in your code. It's
* semantic sugar for the number 0. You can also use `0` or `false` or
* `_False` or `GL_FALSE` or whatever you want.
*/
#define GLFW_FALSE 0
#define GLFW_FALSE false
/*! @} */
/*! @name Key and button actions

2
glfw/internal.h vendored
View File

@ -60,7 +60,7 @@
#define _GLFW_MESSAGE_SIZE 1024
typedef int GLFWbool;
typedef bool GLFWbool;
typedef unsigned long long GLFWid;
typedef struct _GLFWerror _GLFWerror;