#include <irrlicht/irrlicht.h>
#include <libguile.h>
-#include <wchar.h>
#include "dimension2d.h"
#include "EDriverTypes.h"
SCM text)
{
irr::IrrlichtDevice* device = unwrap_device (device_obj);
- char* ctext;
- wchar_t* wtext;
-
- ctext = scm_to_utf8_stringn (text, NULL);
- wtext = (wchar_t*)malloc ((strlen (ctext) + 1) * sizeof (wchar_t));
- mbstowcs (wtext, ctext, strlen (ctext) + 1);
-
- device->setWindowCaption (wtext);
+ device->setWindowCaption (scm_to_wide_char_string (text));
return SCM_UNSPECIFIED;
}