]> git.jsancho.org Git - c-irrlicht.git/commitdiff
Booleans
authorJavier Sancho <jsf@jsancho.org>
Thu, 5 Dec 2019 12:25:11 +0000 (13:25 +0100)
committerJavier Sancho <jsf@jsancho.org>
Thu, 5 Dec 2019 12:25:11 +0000 (13:25 +0100)
include/IrrlichtDevice.h
src/IrrlichtDevice.cpp

index 335fe4b3406305bf095bca2680f77de917a942fa..b328be2b3dd52bb0fd4aee28ddc09d7d861db28b 100644 (file)
@@ -22,6 +22,8 @@
 #ifndef __C_IRRLICHT_DEVICE_H_INCLUDED__
 #define __C_IRRLICHT_DEVICE_H_INCLUDED__
 
+#include <stdbool.h>
+
 #include "ICursorControl.h"
 #include "IFileSystem.h"
 #include "IGUIEnvironment.h"
@@ -49,17 +51,17 @@ extern "C" {
   irr_video_IVideoDriver*
   irr_getVideoDriver(irr_IrrlichtDevice* device);
 
-  int
+  bool
   irr_isWindowActive(irr_IrrlichtDevice* device);
 
   void
   irr_setWindowCaption(irr_IrrlichtDevice* device,
                        const char* text);
 
-  int
+  bool
   irr_run(irr_IrrlichtDevice* device);
 
-  int
+  bool
   irr_drop(irr_IrrlichtDevice* device);
 
   void
index d00ba45e93dad73102ec11717413f5c60c4c78ad..32feec364da9eacc17fff43a32c84c45693d1ee6 100644 (file)
@@ -54,10 +54,10 @@ extern "C" {
     return ((irr::IrrlichtDevice*)device)->getVideoDriver();
   }
 
-  int
+  bool
   irr_isWindowActive(irr_IrrlichtDevice* device)
   {
-    return ((irr::IrrlichtDevice*)device)->isWindowActive() ? 1 : 0;
+    return ((irr::IrrlichtDevice*)device)->isWindowActive();
   }
 
   void
@@ -69,16 +69,16 @@ extern "C" {
     ((irr::IrrlichtDevice*)device)->setWindowCaption(wtext);
   }
 
-  int
+  bool
   irr_run(irr_IrrlichtDevice* device)
   {
-    return ((irr::IrrlichtDevice*)device)->run() ? 1 : 0;
+    return ((irr::IrrlichtDevice*)device)->run();
   }
 
-  int
+  bool
   irr_drop(irr_IrrlichtDevice* device)
   {
-    return ((irr::IrrlichtDevice*)device)->drop() ? 1 : 0;
+    return ((irr::IrrlichtDevice*)device)->drop();
   }
 
   void