From 040051dc8656696abf2b5336dac3fce0eea88c55 Mon Sep 17 00:00:00 2001 From: Kenix3 Date: Wed, 11 Dec 2024 22:06:58 -0500 Subject: [PATCH] LeftOrRightStick -> WhichStick Resolves #707 --- src/controller/controldevice/controller/Controller.cpp | 2 +- src/controller/controldevice/controller/ControllerStick.cpp | 2 +- src/controller/controldevice/controller/ControllerStick.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/controller/controldevice/controller/Controller.cpp b/src/controller/controldevice/controller/Controller.cpp index 24abde100..a9dc22221 100644 --- a/src/controller/controldevice/controller/Controller.cpp +++ b/src/controller/controldevice/controller/Controller.cpp @@ -236,7 +236,7 @@ void Controller::MoveMappingsToDifferentController(std::shared_ptr n for (auto stick : { GetLeftStick(), GetRightStick() }) { auto newControllerStick = - stick->LeftOrRightStick() == LEFT_STICK ? newController->GetLeftStick() : newController->GetRightStick(); + stick->WhichStick() == LEFT_STICK ? newController->GetLeftStick() : newController->GetRightStick(); for (auto [direction, mappings] : stick->GetAllAxisDirectionMappings()) { std::vector axisDirectionMappingIdsToRemove; for (auto [id, mapping] : mappings) { diff --git a/src/controller/controldevice/controller/ControllerStick.cpp b/src/controller/controldevice/controller/ControllerStick.cpp index addff6afb..f739082e8 100644 --- a/src/controller/controldevice/controller/ControllerStick.cpp +++ b/src/controller/controldevice/controller/ControllerStick.cpp @@ -415,7 +415,7 @@ ControllerStick::GetAllAxisDirectionMappings() { return mAxisDirectionMappings; } -Stick ControllerStick::LeftOrRightStick() { +Stick ControllerStick::WhichStick() { return mStick; } } // namespace Ship diff --git a/src/controller/controldevice/controller/ControllerStick.h b/src/controller/controldevice/controller/ControllerStick.h index d748151c6..a86793f67 100644 --- a/src/controller/controldevice/controller/ControllerStick.h +++ b/src/controller/controldevice/controller/ControllerStick.h @@ -54,7 +54,7 @@ class ControllerStick { bool ProcessKeyboardEvent(KbEventType eventType, KbScancode scancode); bool HasMappingsForShipDeviceIndex(ShipDeviceIndex lusIndex); - Stick LeftOrRightStick(); + Stick WhichStick(); private: double GetClosestNotch(double angle, double approximationThreshold);