From: Javier Sancho Date: Sun, 20 Oct 2019 16:55:21 +0000 (+0200) Subject: Some device functions X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=70fa0c75d7a8b9a7f01b7d368f0606f1fef08c6c;p=c-irrlicht.git Some device functions --- diff --git a/include/IrrlichtDevice.h b/include/IrrlichtDevice.h index 3f74464..5728c9f 100644 --- a/include/IrrlichtDevice.h +++ b/include/IrrlichtDevice.h @@ -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 diff --git a/src/IrrlichtDevice.cpp b/src/IrrlichtDevice.cpp index ff416ce..41a6d1d 100644 --- a/src/IrrlichtDevice.cpp +++ b/src/IrrlichtDevice.cpp @@ -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(); + } + }