X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=src%2FIrrlichtDevice.cpp;h=57fefdfac7251563b920367cb4674a232d8b7270;hb=26e0d2232734e893983975b68d3a760b147e8e8c;hp=d782a661c28cc6fb8f44c8c2934f5d32263a930f;hpb=6447ec2a902b0c75e02aca3d75b5991f5e290663;p=c-irrlicht.git diff --git a/src/IrrlichtDevice.cpp b/src/IrrlichtDevice.cpp index d782a66..57fefdf 100644 --- a/src/IrrlichtDevice.cpp +++ b/src/IrrlichtDevice.cpp @@ -24,6 +24,11 @@ #include "IrrlichtDevice.h" extern "C" { + void* irr_IrrlichtDevice_getGUIEnvironment(void* device) + { + return ((irr::IrrlichtDevice*)device)->getGUIEnvironment(); + } + void* irr_IrrlichtDevice_getSceneManager(void* device) { return ((irr::IrrlichtDevice*)device)->getSceneManager(); @@ -36,7 +41,7 @@ extern "C" { void irr_IrrlichtDevice_setWindowCaption(void* device, const char* text) { - wchar_t *wtext = (wchar_t*)malloc(strlen(text) + 1); + wchar_t *wtext = (wchar_t*)malloc((strlen(text) + 1) * sizeof(wchar_t)); mbsrtowcs(wtext, &text, strlen(text) + 1, NULL); ((irr::IrrlichtDevice*)device)->setWindowCaption(wtext); }