X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=src%2FIVideoDriver.cpp;h=86d7347b31e7e5baf832f50f7b4957524c478f22;hb=d4c1672f2e51f17dd6d125c37ec2ef058faf5d69;hp=13a21d15998e3e4de0abc74a87b7c19b9879ca16;hpb=4881087cbf493d736995a4051e0d13ed63ad6c3a;p=c-irrlicht.git diff --git a/src/IVideoDriver.cpp b/src/IVideoDriver.cpp index 13a21d1..86d7347 100644 --- a/src/IVideoDriver.cpp +++ b/src/IVideoDriver.cpp @@ -38,21 +38,24 @@ extern "C" { irr::video::SExposedVideoData vdata = irr::video::SExposedVideoData(); // Source rect - irr::core::rect rect = \ - irr::core::rect(sourceRect->x, - sourceRect->y, - sourceRect->x2, - sourceRect->y2); + irr::core::rect rect; + if (sourceRect != NULL) + { + rect = irr::core::rect(sourceRect->x, + sourceRect->y, + sourceRect->x2, + sourceRect->y2); + } // Begin scene return ((irr::video::IVideoDriver*)driver)->beginScene(backBuffer, - zBuffer, - col, - vdata, - &rect); + zBuffer, + col, + vdata, + sourceRect != NULL ? &rect : 0); } - bool irr_videoIVideoDriver_endScene(void* driver) + bool irr_video_IVideoDriver_endScene(void* driver) { return ((irr::video::IVideoDriver*)driver)->endScene(); }