Stop grabbing mouse cursor when the window is not active in example 18

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6216 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien 2021-05-31 12:43:37 +00:00
parent f103ea3dac
commit 2acce15bcd

View File

@ -170,6 +170,9 @@ Sounds a little complicated, but you'll see it isn't:
while(device->run()) while(device->run())
{ {
// Don't reset mouse cursor when window is not active
camera[3]->setInputReceiverEnabled(device->isWindowActive());
//Set the viewpoint to the whole screen and begin scene //Set the viewpoint to the whole screen and begin scene
driver->setViewPort(rect<s32>(0,0,ResX,ResY)); driver->setViewPort(rect<s32>(0,0,ResX,ResY));
driver->beginScene(video::ECBF_COLOR | video::ECBF_DEPTH, SColor(255,100,100,100)); driver->beginScene(video::ECBF_COLOR | video::ECBF_DEPTH, SColor(255,100,100,100));