From 9a2ff9e419d1fa685f71878850417bbc65926a04 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 3 Feb 2019 10:13:02 +0530 Subject: [PATCH] Use stdbool for glfw boolean types --- glfw/glfw3.h | 6 ++++-- glfw/internal.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/glfw/glfw3.h b/glfw/glfw3.h index fd4a9144f..5a9a552e5 100644 --- a/glfw/glfw3.h +++ b/glfw/glfw3.h @@ -133,6 +133,8 @@ extern "C" { */ #include +#include + /* 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 diff --git a/glfw/internal.h b/glfw/internal.h index f5fe8d021..52d8d42f1 100644 --- a/glfw/internal.h +++ b/glfw/internal.h @@ -60,7 +60,7 @@ #define _GLFW_MESSAGE_SIZE 1024 -typedef int GLFWbool; +typedef bool GLFWbool; typedef unsigned long long GLFWid; typedef struct _GLFWerror _GLFWerror;