diff --git a/source/Irrlicht/CSceneNodeAnimatorCameraFPS.cpp b/source/Irrlicht/CSceneNodeAnimatorCameraFPS.cpp index 6da1c0b4..ce18bfdf 100644 --- a/source/Irrlicht/CSceneNodeAnimatorCameraFPS.cpp +++ b/source/Irrlicht/CSceneNodeAnimatorCameraFPS.cpp @@ -19,16 +19,17 @@ namespace scene CSceneNodeAnimatorCameraFPS::CSceneNodeAnimatorCameraFPS(gui::ICursorControl* cursorControl, f32 rotateSpeed, f32 moveSpeed, f32 jumpSpeed, SKeyMap* keyMapArray, u32 keyMapSize, bool noVerticalMovement, bool invertY, float rotateSpeedKeyboard) -: CursorControl(cursorControl), MaxVerticalAngle(88.0f), NoVerticalMovement(noVerticalMovement), - MoveSpeed(moveSpeed), +: CursorControl(cursorControl), // On X11 we get events even when mouse is not inside the Irrlicht window, on Windows we don't. // It might be possible to add grabbing on Windows as well in which case this has to be somewhat changed. // TODO: I don't know about OSX, but in theory it should be like old Irrlicht 1.8 behavior whatever that was there. -#ifdef _IRR_COMPILE_WITH_X11_DEVICE_ +#ifdef _IRR_COMPILE_WITH_X11_DEVICE_ GrabMouse(false), #else GrabMouse(true), #endif + MaxVerticalAngle(88.0f), NoVerticalMovement(noVerticalMovement), + MoveSpeed(moveSpeed), RotateSpeedKeyboard(rotateSpeedKeyboard), RotateSpeed(rotateSpeed), JumpSpeed(jumpSpeed), MouseYDirection(invertY ? -1.0f : 1.0f),