]> git.jsancho.org Git - c-irrlicht.git/commitdiff
Some device functions
authorJavier Sancho <jsf@jsancho.org>
Sun, 20 Oct 2019 16:55:21 +0000 (18:55 +0200)
committerJavier Sancho <jsf@jsancho.org>
Sun, 20 Oct 2019 16:55:21 +0000 (18:55 +0200)
include/IrrlichtDevice.h
src/IrrlichtDevice.cpp

index 3f7446469bd02b640c6b16896829ce2d0bbab2d4..5728c9f7800e7130751688a7bbdd92aa374c8bf3 100644 (file)
@@ -49,6 +49,9 @@ extern "C" {
   irr_video_IVideoDriver*
   irr_getVideoDriver(irr_IrrlichtDevice* device);
 
+  int
+  irr_isWindowActive(irr_IrrlichtDevice* device);
+
   void
   irr_setWindowCaption(irr_IrrlichtDevice* device,
                                       const char* text);
@@ -59,6 +62,9 @@ extern "C" {
   int
   irr_drop(irr_IrrlichtDevice* device);
 
+  void
+  irr_yield(irr_IrrlichtDevice* device);
+
 #ifdef __cplusplus
 }
 #endif
index ff416ce5968e5d0417f22aee4fda346450b11ff7..41a6d1d647c8d5ef1fdae7a883327a0cef615222 100644 (file)
@@ -54,6 +54,12 @@ extern "C" {
     return ((irr::IrrlichtDevice*)device)->getVideoDriver();
   }
 
+  int
+  irr_isWindowActive(irr_IrrlichtDevice* device)
+  {
+    return ((irr::IrrlichtDevice*)device)->isWindowActive() ? 1 : 0;
+  }
+
   void
   irr_setWindowCaption(irr_IrrlichtDevice* device,
                        const char* text)
@@ -74,4 +80,11 @@ extern "C" {
   {
     return ((irr::IrrlichtDevice*)device)->drop() ? 1 : 0;
   }
+
+  void
+  irr_yield(irr_IrrlichtDevice* device)
+  {
+    ((irr::IrrlichtDevice*)device)->yield();
+  }
+
 }