Skip to content

Commit

Permalink
LeftOrRightStick -> WhichStick
Browse files Browse the repository at this point in the history
Resolves #707
  • Loading branch information
Kenix3 committed Dec 12, 2024
1 parent 275b0d3 commit 040051d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/controller/controldevice/controller/Controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ void Controller::MoveMappingsToDifferentController(std::shared_ptr<Controller> 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<std::string> axisDirectionMappingIdsToRemove;
for (auto [id, mapping] : mappings) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ ControllerStick::GetAllAxisDirectionMappings() {
return mAxisDirectionMappings;
}

Stick ControllerStick::LeftOrRightStick() {
Stick ControllerStick::WhichStick() {
return mStick;
}
} // namespace Ship
2 changes: 1 addition & 1 deletion src/controller/controldevice/controller/ControllerStick.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 040051d

Please sign in to comment.