From 2acce15bcd4852605612507ee77b06a3df32693f Mon Sep 17 00:00:00 2001 From: cutealien Date: Mon, 31 May 2021 12:43:37 +0000 Subject: [PATCH] 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 --- examples/18.SplitScreen/main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/18.SplitScreen/main.cpp b/examples/18.SplitScreen/main.cpp index 600b7bf8..85aa403d 100644 --- a/examples/18.SplitScreen/main.cpp +++ b/examples/18.SplitScreen/main.cpp @@ -170,6 +170,9 @@ Sounds a little complicated, but you'll see it isn't: 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 driver->setViewPort(rect(0,0,ResX,ResY)); driver->beginScene(video::ECBF_COLOR | video::ECBF_DEPTH, SColor(255,100,100,100));