From: Javier Sancho Date: Wed, 2 Oct 2019 15:16:07 +0000 (+0200) Subject: Use pointer to struct X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=0cfcac8af8018c7f009d81e858a216e0d88f6514;p=c-irrlicht.git Use pointer to struct --- diff --git a/include/cirrlicht.h b/include/cirrlicht.h index 73af3f1..80b69cb 100644 --- a/include/cirrlicht.h +++ b/include/cirrlicht.h @@ -30,7 +30,7 @@ extern "C" { #endif int irr_createDevice(irr_video_E_DRIVER_TYPE deviceType, - irr_core_dimension2d_u32 windowSize); + const irr_core_dimension2d_u32* windowSize); #ifdef __cplusplus } diff --git a/src/CIrrlicht.cpp b/src/CIrrlicht.cpp index 41076cf..7f10b2b 100644 --- a/src/CIrrlicht.cpp +++ b/src/CIrrlicht.cpp @@ -24,11 +24,11 @@ extern "C" { int irr_createDevice(irr_video_E_DRIVER_TYPE deviceType, - irr_core_dimension2d_u32 windowSize) + const irr_core_dimension2d_u32* windowSize) { irr::core::dimension2d wsize = \ - irr::core::dimension2d(windowSize.width, - windowSize.height); + irr::core::dimension2d(windowSize->width, + windowSize->height); irr::createDevice((irr::video::E_DRIVER_TYPE)deviceType, wsize); return 0;