From 6447ec2a902b0c75e02aca3d75b5991f5e290663 Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Fri, 4 Oct 2019 17:50:04 +0200 Subject: [PATCH] run and drop device --- include/IrrlichtDevice.h | 2 ++ src/IrrlichtDevice.cpp | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/include/IrrlichtDevice.h b/include/IrrlichtDevice.h index 5668628..e389d35 100644 --- a/include/IrrlichtDevice.h +++ b/include/IrrlichtDevice.h @@ -29,6 +29,8 @@ extern "C" { void* irr_IrrlichtDevice_getSceneManager(void* device); void* irr_IrrlichtDevice_getVideoDriver(void* device); void irr_IrrlichtDevice_setWindowCaption(void* device, const char* text); + int irr_IrrlichtDevice_run(void* device); + int irr_IrrlichtDevice_drop(void* device); #ifdef __cplusplus } diff --git a/src/IrrlichtDevice.cpp b/src/IrrlichtDevice.cpp index 37c578b..d782a66 100644 --- a/src/IrrlichtDevice.cpp +++ b/src/IrrlichtDevice.cpp @@ -40,4 +40,14 @@ extern "C" { mbsrtowcs(wtext, &text, strlen(text) + 1, NULL); ((irr::IrrlichtDevice*)device)->setWindowCaption(wtext); } + + int irr_IrrlichtDevice_run(void* device) + { + return ((irr::IrrlichtDevice*)device)->run() ? 1 : 0; + } + + int irr_IrrlichtDevice_drop(void* device) + { + return ((irr::IrrlichtDevice*)device)->drop() ? 1 : 0; + } } -- 2.39.5