extern "C" {
#endif
- int irr_createDevice(irr_video_E_DRIVER_TYPE deviceType,
- const irr_core_dimension2d_u32* windowSize,
- u_int32_t bits,
- bool fullscreen,
- bool stencilbuffer,
- bool vsync);
+ void* irr_createDevice(irr_video_E_DRIVER_TYPE deviceType,
+ const irr_core_dimension2d_u32* windowSize,
+ u_int32_t bits,
+ bool fullscreen,
+ bool stencilbuffer,
+ bool vsync);
#ifdef __cplusplus
}
#include "cirrlicht.h"
extern "C" {
- int irr_createDevice(irr_video_E_DRIVER_TYPE deviceType,
- const irr_core_dimension2d_u32* windowSize,
- u_int32_t bits,
- bool fullscreen,
- bool stencilbuffer,
- bool vsync)
+ void* irr_createDevice(irr_video_E_DRIVER_TYPE deviceType,
+ const irr_core_dimension2d_u32* windowSize,
+ u_int32_t bits,
+ bool fullscreen,
+ bool stencilbuffer,
+ bool vsync)
{
irr::core::dimension2d<irr::u32> wsize = \
irr::core::dimension2d<irr::u32>(windowSize->width,
windowSize->height);
- irr::createDevice((irr::video::E_DRIVER_TYPE)deviceType,
- wsize, bits, fullscreen, stencilbuffer,
- vsync);
- return 0;
+ irr::IrrlichtDevice *device = \
+ irr::createDevice((irr::video::E_DRIVER_TYPE)deviceType,
+ wsize, bits, fullscreen, stencilbuffer,
+ vsync);
+ return device;
}
}