From ff86a19cc33d198b2d6e4554e5049d37d7ae68cf Mon Sep 17 00:00:00 2001 From: Jan Date: Tue, 24 Aug 2021 18:09:06 +0200 Subject: [PATCH] Fix gamepad release compiling --- src/Components/Modules/Gamepad.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Components/Modules/Gamepad.cpp b/src/Components/Modules/Gamepad.cpp index 8acb152c..d2db967d 100644 --- a/src/Components/Modules/Gamepad.cpp +++ b/src/Components/Modules/Gamepad.cpp @@ -490,6 +490,8 @@ namespace Components void Gamepad::CL_RemoteControlMove_GamePad(const int localClientNum, Game::usercmd_s* cmd) { + // Buttons are already handled by keyboard input handler + const auto up = CL_GamepadAxisValue(localClientNum, Game::GPAD_VIRTAXIS_FORWARD); const auto right = CL_GamepadAxisValue(localClientNum, Game::GPAD_VIRTAXIS_SIDE); const auto sensitivity = input_viewSensitivity.get(); @@ -518,8 +520,10 @@ namespace Components } } - bool Gamepad::CG_HandleLocationSelectionInput_GamePad(const int localClientNum, Game::usercmd_s* cmd) + bool Gamepad::CG_HandleLocationSelectionInput_GamePad(const int localClientNum, Game::usercmd_s* /*cmd*/) { + // Buttons are already handled by keyboard input handler + const auto frameTime = static_cast(Game::cgArray[0].frametime) * 0.001f; const auto mapAspectRatio = Game::cgArray[0].compassMapWorldSize[0] / Game::cgArray[0].compassMapWorldSize[1]; const auto selectionRequiresAngle = (Game::cgArray[0].predictedPlayerState.locationSelectionInfo & 0x80) != 0;