From 70fa0c75d7a8b9a7f01b7d368f0606f1fef08c6c Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Sun, 20 Oct 2019 18:55:21 +0200 Subject: [PATCH] Some device functions --- include/IrrlichtDevice.h | 6 ++++++ src/IrrlichtDevice.cpp | 13 +++++++++++++ 2 files changed, 19 insertions(+) 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(); + } + } -- 2.39.2