#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();
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);
}