From 6f7578b374cd46106577d30adbdc435814e73ff6 Mon Sep 17 00:00:00 2001 From: cutealien Date: Mon, 26 Oct 2020 19:55:38 +0000 Subject: [PATCH] Fix member intialization order to avoid warning on gcc. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6143 dfc29bdd-3216-0410-991c-e03cc46cb475 --- source/Irrlicht/CSceneNodeAnimatorCameraFPS.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/Irrlicht/CSceneNodeAnimatorCameraFPS.cpp b/source/Irrlicht/CSceneNodeAnimatorCameraFPS.cpp index 6da1c0b..ce18bfd 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),