Skip to content

Commit e7d28a5

Browse files
committed
create new physicaldevice directory where the new stuff can live
1 parent 1e1fe6d commit e7d28a5

File tree

66 files changed

+307
-275
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+307
-275
lines changed

src/controller/controldeck/ControlDeck.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ void ControlDeck::Init(uint8_t* controllerBits) {
3030

3131
// if we don't have a config for controller 1, set default bindings
3232
if (!mPorts[0]->GetConnectedController()->HasConfig()) {
33-
mPorts[0]->GetConnectedController()->AddDefaultMappings(ShipDeviceType::Keyboard);
34-
mPorts[0]->GetConnectedController()->AddDefaultMappings(ShipDeviceType::Mouse);
35-
mPorts[0]->GetConnectedController()->AddDefaultMappings(ShipDeviceType::SDLGamepad);
33+
mPorts[0]->GetConnectedController()->AddDefaultMappings(PhysicalDeviceType::Keyboard);
34+
mPorts[0]->GetConnectedController()->AddDefaultMappings(PhysicalDeviceType::Mouse);
35+
mPorts[0]->GetConnectedController()->AddDefaultMappings(PhysicalDeviceType::SDLGamepad);
3636
}
3737

3838
Context::GetInstance()->GetWindow()->GetGui()->GetGuiWindow("Controller Reordering")->Show();

src/controller/controldevice/controller/Controller.cpp

+19-19
Original file line numberDiff line numberDiff line change
@@ -86,28 +86,28 @@ void Controller::ClearAllMappings() {
8686
GetLED()->ClearAllMappings();
8787
}
8888

89-
void Controller::ClearAllMappingsForDeviceType(ShipDeviceType shipDeviceType) {
89+
void Controller::ClearAllMappingsForDeviceType(PhysicalDeviceType physicalDeviceType) {
9090
for (auto [bitmask, button] : GetAllButtons()) {
91-
button->ClearAllButtonMappingsForDeviceType(shipDeviceType);
91+
button->ClearAllButtonMappingsForDeviceType(physicalDeviceType);
9292
}
93-
GetLeftStick()->ClearAllMappingsForDeviceType(shipDeviceType);
94-
GetRightStick()->ClearAllMappingsForDeviceType(shipDeviceType);
93+
GetLeftStick()->ClearAllMappingsForDeviceType(physicalDeviceType);
94+
GetRightStick()->ClearAllMappingsForDeviceType(physicalDeviceType);
9595

9696
auto gyroMapping = GetGyro()->GetGyroMapping();
97-
if (gyroMapping != nullptr && gyroMapping->GetShipDeviceType() == shipDeviceType) {
97+
if (gyroMapping != nullptr && gyroMapping->GetPhysicalDeviceType() == physicalDeviceType) {
9898
GetGyro()->ClearGyroMapping();
9999
}
100100

101-
GetRumble()->ClearAllMappingsForDeviceType(shipDeviceType);
102-
GetLED()->ClearAllMappingsForDeviceType(shipDeviceType);
101+
GetRumble()->ClearAllMappingsForDeviceType(physicalDeviceType);
102+
GetLED()->ClearAllMappingsForDeviceType(physicalDeviceType);
103103
}
104104

105-
void Controller::AddDefaultMappings(ShipDeviceType shipDeviceType) {
105+
void Controller::AddDefaultMappings(PhysicalDeviceType physicalDeviceType) {
106106
for (auto [bitmask, button] : GetAllButtons()) {
107-
button->AddDefaultMappings(shipDeviceType);
107+
button->AddDefaultMappings(physicalDeviceType);
108108
}
109-
GetLeftStick()->AddDefaultMappings(shipDeviceType);
110-
GetRumble()->AddDefaultMappings(shipDeviceType);
109+
GetLeftStick()->AddDefaultMappings(physicalDeviceType);
110+
GetRumble()->AddDefaultMappings(physicalDeviceType);
111111

112112
const std::string hasConfigCvarKey =
113113
StringHelper::Sprintf(CVAR_PREFIX_CONTROLLERS ".Port%d.HasConfig", mPortIndex + 1);
@@ -146,25 +146,25 @@ bool Controller::ProcessMouseButtonEvent(bool isPressed, MouseBtn mouseButton) {
146146
return result;
147147
}
148148

149-
bool Controller::HasMappingsForShipDeviceType(ShipDeviceType shipDeviceType) {
149+
bool Controller::HasMappingsForPhysicalDeviceType(PhysicalDeviceType physicalDeviceType) {
150150
for (auto [bitmask, button] : GetAllButtons()) {
151-
if (button->HasMappingsForShipDeviceType(shipDeviceType)) {
151+
if (button->HasMappingsForPhysicalDeviceType(physicalDeviceType)) {
152152
return true;
153153
}
154154
}
155-
if (GetLeftStick()->HasMappingsForShipDeviceType(shipDeviceType)) {
155+
if (GetLeftStick()->HasMappingsForPhysicalDeviceType(physicalDeviceType)) {
156156
return true;
157157
}
158-
if (GetRightStick()->HasMappingsForShipDeviceType(shipDeviceType)) {
158+
if (GetRightStick()->HasMappingsForPhysicalDeviceType(physicalDeviceType)) {
159159
return true;
160160
}
161-
if (GetGyro()->HasMappingForShipDeviceType(shipDeviceType)) {
161+
if (GetGyro()->HasMappingForPhysicalDeviceType(physicalDeviceType)) {
162162
return true;
163163
}
164-
if (GetRumble()->HasMappingsForShipDeviceType(shipDeviceType)) {
164+
if (GetRumble()->HasMappingsForPhysicalDeviceType(physicalDeviceType)) {
165165
return true;
166166
}
167-
if (GetLED()->HasMappingsForShipDeviceType(shipDeviceType)) {
167+
if (GetLED()->HasMappingsForPhysicalDeviceType(physicalDeviceType)) {
168168
return true;
169169
}
170170

@@ -175,7 +175,7 @@ std::shared_ptr<ControllerButton> Controller::GetButtonByBitmask(CONTROLLERBUTTO
175175
return mButtons[bitmask];
176176
}
177177

178-
void Controller::MoveMappingsToDifferentController(std::shared_ptr<Controller> newController, ShipDeviceType lusIndex) {
178+
void Controller::MoveMappingsToDifferentController(std::shared_ptr<Controller> newController, PhysicalDeviceType lusIndex) {
179179
// todo: remove this entirely
180180
return;
181181
}

src/controller/controldevice/controller/Controller.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ class Controller : public ControlDevice {
3333
void Disconnect();
3434

3535
void ClearAllMappings();
36-
void ClearAllMappingsForDeviceType(ShipDeviceType shipDeviceType);
37-
void AddDefaultMappings(ShipDeviceType shipDeviceType);
36+
void ClearAllMappingsForDeviceType(PhysicalDeviceType physicalDeviceType);
37+
void AddDefaultMappings(PhysicalDeviceType physicalDeviceType);
3838
std::unordered_map<CONTROLLERBUTTONS_T, std::shared_ptr<ControllerButton>> GetAllButtons();
3939
std::shared_ptr<ControllerButton> GetButtonByBitmask(CONTROLLERBUTTONS_T bitmask);
4040
std::shared_ptr<ControllerButton> GetButton(CONTROLLERBUTTONS_T bitmask);
@@ -51,8 +51,8 @@ class Controller : public ControlDevice {
5151
bool ProcessKeyboardEvent(KbEventType eventType, KbScancode scancode);
5252
bool ProcessMouseButtonEvent(bool isPressed, MouseBtn button);
5353

54-
bool HasMappingsForShipDeviceType(ShipDeviceType shipDeviceType);
55-
void MoveMappingsToDifferentController(std::shared_ptr<Controller> newController, ShipDeviceType lusIndex);
54+
bool HasMappingsForPhysicalDeviceType(PhysicalDeviceType physicalDeviceType);
55+
void MoveMappingsToDifferentController(std::shared_ptr<Controller> newController, PhysicalDeviceType lusIndex);
5656

5757
protected:
5858
std::unordered_map<CONTROLLERBUTTONS_T, std::shared_ptr<ControllerButton>> mButtons;

src/controller/controldevice/controller/ControllerButton.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@ void ControllerButton::ClearAllButtonMappings() {
146146
SaveButtonMappingIdsToConfig();
147147
}
148148

149-
void ControllerButton::ClearAllButtonMappingsForDeviceType(ShipDeviceType shipDeviceType) {
149+
void ControllerButton::ClearAllButtonMappingsForDeviceType(PhysicalDeviceType physicalDeviceType) {
150150
std::vector<std::string> mappingIdsToRemove;
151151
for (auto [id, mapping] : mButtonMappings) {
152-
if (mapping->GetShipDeviceType() == shipDeviceType) {
152+
if (mapping->GetPhysicalDeviceType() == physicalDeviceType) {
153153
mapping->EraseFromConfig();
154154
mappingIdsToRemove.push_back(id);
155155
}
@@ -170,9 +170,9 @@ void ControllerButton::UpdatePad(CONTROLLERBUTTONS_T& padButtons) {
170170
}
171171
}
172172

173-
bool ControllerButton::HasMappingsForShipDeviceType(ShipDeviceType shipDeviceType) {
174-
return std::any_of(mButtonMappings.begin(), mButtonMappings.end(), [shipDeviceType](const auto& mapping) {
175-
return mapping.second->GetShipDeviceType() == shipDeviceType;
173+
bool ControllerButton::HasMappingsForPhysicalDeviceType(PhysicalDeviceType physicalDeviceType) {
174+
return std::any_of(mButtonMappings.begin(), mButtonMappings.end(), [physicalDeviceType](const auto& mapping) {
175+
return mapping.second->GetPhysicalDeviceType() == physicalDeviceType;
176176
});
177177
}
178178

@@ -265,12 +265,12 @@ bool ControllerButton::ProcessMouseButtonEvent(bool isPressed, MouseBtn button)
265265
return result;
266266
}
267267

268-
void ControllerButton::AddDefaultMappings(ShipDeviceType shipDeviceType) {
268+
void ControllerButton::AddDefaultMappings(PhysicalDeviceType physicalDeviceType) {
269269
for (auto mapping : ButtonMappingFactory::CreateDefaultSDLButtonMappings(mPortIndex, mBitmask)) {
270270
AddButtonMapping(mapping);
271271
}
272272

273-
if (shipDeviceType == ShipDeviceType::Keyboard) {
273+
if (physicalDeviceType == PhysicalDeviceType::Keyboard) {
274274
for (auto mapping : ButtonMappingFactory::CreateDefaultKeyboardButtonMappings(mPortIndex, mBitmask)) {
275275
AddButtonMapping(mapping);
276276
}

src/controller/controldevice/controller/ControllerButton.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ class ControllerButton {
2424
void ClearButtonMappingId(std::string id);
2525
void ClearButtonMapping(std::string id);
2626
void ClearButtonMapping(std::shared_ptr<ControllerButtonMapping> mapping);
27-
void AddDefaultMappings(ShipDeviceType shipDeviceType);
27+
void AddDefaultMappings(PhysicalDeviceType physicalDeviceType);
2828

2929
void LoadButtonMappingFromConfig(std::string id);
3030
void SaveButtonMappingIdsToConfig();
3131
void ReloadAllMappingsFromConfig();
3232
void ClearAllButtonMappings();
33-
void ClearAllButtonMappingsForDeviceType(ShipDeviceType shipDeviceType);
33+
void ClearAllButtonMappingsForDeviceType(PhysicalDeviceType physicalDeviceType);
3434

3535
bool AddOrEditButtonMappingFromRawPress(CONTROLLERBUTTONS_T bitmask, std::string id);
3636

@@ -39,7 +39,7 @@ class ControllerButton {
3939
bool ProcessKeyboardEvent(KbEventType eventType, KbScancode scancode);
4040
bool ProcessMouseButtonEvent(bool isPressed, Ship::MouseBtn button);
4141

42-
bool HasMappingsForShipDeviceType(ShipDeviceType shipDeviceType);
42+
bool HasMappingsForPhysicalDeviceType(PhysicalDeviceType physicalDeviceType);
4343

4444
private:
4545
uint8_t mPortIndex;

src/controller/controldevice/controller/ControllerGyro.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ void ControllerGyro::ReloadGyroMappingFromConfig() {
8484
SaveGyroMappingIdToConfig();
8585
}
8686

87-
bool ControllerGyro::HasMappingForShipDeviceType(ShipDeviceType shipDeviceType) {
87+
bool ControllerGyro::HasMappingForPhysicalDeviceType(PhysicalDeviceType physicalDeviceType) {
8888
if (mGyroMapping == nullptr) {
8989
return false;
9090
}
9191

92-
return mGyroMapping->GetShipDeviceType() == shipDeviceType;
92+
return mGyroMapping->GetPhysicalDeviceType() == physicalDeviceType;
9393
}
9494
} // namespace Ship

src/controller/controldevice/controller/ControllerGyro.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class ControllerGyro {
2222

2323
void UpdatePad(float& x, float& y);
2424

25-
bool HasMappingForShipDeviceType(ShipDeviceType shipDeviceType);
25+
bool HasMappingForPhysicalDeviceType(PhysicalDeviceType physicalDeviceType);
2626

2727
private:
2828
uint8_t mPortIndex;

src/controller/controldevice/controller/ControllerLED.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ void ControllerLED::ClearAllMappings() {
6262
SaveLEDMappingIdsToConfig();
6363
}
6464

65-
void ControllerLED::ClearAllMappingsForDeviceType(ShipDeviceType shipDeviceType) {
65+
void ControllerLED::ClearAllMappingsForDeviceType(PhysicalDeviceType physicalDeviceType) {
6666
std::vector<std::string> mappingIdsToRemove;
6767
for (auto [id, mapping] : mLEDMappings) {
68-
if (mapping->GetShipDeviceType() == shipDeviceType) {
68+
if (mapping->GetPhysicalDeviceType() == physicalDeviceType) {
6969
mapping->EraseFromConfig();
7070
mappingIdsToRemove.push_back(id);
7171
}
@@ -130,9 +130,9 @@ bool ControllerLED::AddLEDMappingFromRawPress() {
130130
return true;
131131
}
132132

133-
bool ControllerLED::HasMappingsForShipDeviceType(ShipDeviceType shipDeviceType) {
134-
return std::any_of(mLEDMappings.begin(), mLEDMappings.end(), [shipDeviceType](const auto& mapping) {
135-
return mapping.second->GetShipDeviceType() == shipDeviceType;
133+
bool ControllerLED::HasMappingsForPhysicalDeviceType(PhysicalDeviceType physicalDeviceType) {
134+
return std::any_of(mLEDMappings.begin(), mLEDMappings.end(), [physicalDeviceType](const auto& mapping) {
135+
return mapping.second->GetPhysicalDeviceType() == physicalDeviceType;
136136
});
137137
}
138138
} // namespace Ship

src/controller/controldevice/controller/ControllerLED.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ class ControllerLED {
1919
void ClearLEDMapping(std::string id);
2020
void SaveLEDMappingIdsToConfig();
2121
void ClearAllMappings();
22-
void ClearAllMappingsForDeviceType(ShipDeviceType shipDeviceType);
22+
void ClearAllMappingsForDeviceType(PhysicalDeviceType physicalDeviceType);
2323
void LoadLEDMappingFromConfig(std::string id);
2424
void ReloadAllMappingsFromConfig();
2525

2626
bool AddLEDMappingFromRawPress();
2727

2828
void SetLEDColor(Color_RGB8 color);
2929

30-
bool HasMappingsForShipDeviceType(ShipDeviceType shipDeviceType);
30+
bool HasMappingsForPhysicalDeviceType(PhysicalDeviceType physicalDeviceType);
3131

3232
private:
3333
uint8_t mPortIndex;

src/controller/controldevice/controller/ControllerRumble.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ void ControllerRumble::ClearAllMappings() {
6767
SaveRumbleMappingIdsToConfig();
6868
}
6969

70-
void ControllerRumble::ClearAllMappingsForDeviceType(ShipDeviceType shipDeviceType) {
70+
void ControllerRumble::ClearAllMappingsForDeviceType(PhysicalDeviceType physicalDeviceType) {
7171
std::vector<std::string> mappingIdsToRemove;
7272
for (auto [id, mapping] : mRumbleMappings) {
73-
if (mapping->GetShipDeviceType() == shipDeviceType) {
73+
if (mapping->GetPhysicalDeviceType() == physicalDeviceType) {
7474
mapping->EraseFromConfig();
7575
mappingIdsToRemove.push_back(id);
7676
}
@@ -85,8 +85,8 @@ void ControllerRumble::ClearAllMappingsForDeviceType(ShipDeviceType shipDeviceTy
8585
SaveRumbleMappingIdsToConfig();
8686
}
8787

88-
void ControllerRumble::AddDefaultMappings(ShipDeviceType shipDeviceType) {
89-
for (auto mapping : RumbleMappingFactory::CreateDefaultSDLRumbleMappings(shipDeviceType, mPortIndex)) {
88+
void ControllerRumble::AddDefaultMappings(PhysicalDeviceType physicalDeviceType) {
89+
for (auto mapping : RumbleMappingFactory::CreateDefaultSDLRumbleMappings(physicalDeviceType, mPortIndex)) {
9090
AddRumbleMapping(mapping);
9191
}
9292

@@ -146,9 +146,9 @@ bool ControllerRumble::AddRumbleMappingFromRawPress() {
146146
return true;
147147
}
148148

149-
bool ControllerRumble::HasMappingsForShipDeviceType(ShipDeviceType shipDeviceType) {
150-
return std::any_of(mRumbleMappings.begin(), mRumbleMappings.end(), [shipDeviceType](const auto& mapping) {
151-
return mapping.second->GetShipDeviceType() == shipDeviceType;
149+
bool ControllerRumble::HasMappingsForPhysicalDeviceType(PhysicalDeviceType physicalDeviceType) {
150+
return std::any_of(mRumbleMappings.begin(), mRumbleMappings.end(), [physicalDeviceType](const auto& mapping) {
151+
return mapping.second->GetPhysicalDeviceType() == physicalDeviceType;
152152
});
153153
}
154154
} // namespace Ship

src/controller/controldevice/controller/ControllerRumble.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class ControllerRumble {
1919
void ClearRumbleMapping(std::string id);
2020
void SaveRumbleMappingIdsToConfig();
2121
void ClearAllMappings();
22-
void ClearAllMappingsForDeviceType(ShipDeviceType shipDeviceType);
23-
void AddDefaultMappings(ShipDeviceType shipDeviceType);
22+
void ClearAllMappingsForDeviceType(PhysicalDeviceType physicalDeviceType);
23+
void AddDefaultMappings(PhysicalDeviceType physicalDeviceType);
2424
void LoadRumbleMappingFromConfig(std::string id);
2525
void ReloadAllMappingsFromConfig();
2626

@@ -29,7 +29,7 @@ class ControllerRumble {
2929
void StartRumble();
3030
void StopRumble();
3131

32-
bool HasMappingsForShipDeviceType(ShipDeviceType shipDeviceType);
32+
bool HasMappingsForPhysicalDeviceType(PhysicalDeviceType physicalDeviceType);
3333

3434
private:
3535
uint8_t mPortIndex;

src/controller/controldevice/controller/ControllerStick.cpp

+9-9
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ void ControllerStick::ClearAllMappings() {
4949
SetNotchSnapAngle(0);
5050
}
5151

52-
void ControllerStick::ClearAllMappingsForDeviceType(ShipDeviceType shipDeviceType) {
52+
void ControllerStick::ClearAllMappingsForDeviceType(PhysicalDeviceType physicalDeviceType) {
5353
std::vector<std::string> mappingIdsToRemove;
5454
for (auto [direction, directionMappings] : mAxisDirectionMappings) {
5555
for (auto [id, mapping] : directionMappings) {
56-
if (mapping->GetShipDeviceType() == shipDeviceType) {
56+
if (mapping->GetPhysicalDeviceType() == physicalDeviceType) {
5757
mapping->EraseFromConfig();
5858
mappingIdsToRemove.push_back(id);
5959
}
@@ -124,13 +124,13 @@ void ControllerStick::AddAxisDirectionMapping(Direction direction,
124124
mAxisDirectionMappings[direction][mapping->GetAxisDirectionMappingId()] = mapping;
125125
}
126126

127-
void ControllerStick::AddDefaultMappings(ShipDeviceType shipDeviceType) {
127+
void ControllerStick::AddDefaultMappings(PhysicalDeviceType physicalDeviceType) {
128128
for (auto mapping :
129-
AxisDirectionMappingFactory::CreateDefaultSDLAxisDirectionMappings(shipDeviceType, mPortIndex, mStickIndex)) {
129+
AxisDirectionMappingFactory::CreateDefaultSDLAxisDirectionMappings(physicalDeviceType, mPortIndex, mStickIndex)) {
130130
AddAxisDirectionMapping(mapping->GetDirection(), mapping);
131131
}
132132

133-
if (shipDeviceType == ShipDeviceType::Keyboard) {
133+
if (physicalDeviceType == PhysicalDeviceType::Keyboard) {
134134
for (auto mapping :
135135
AxisDirectionMappingFactory::CreateDefaultKeyboardAxisDirectionMappings(mPortIndex, mStickIndex)) {
136136
AddAxisDirectionMapping(mapping->GetDirection(), mapping);
@@ -445,12 +445,12 @@ bool ControllerStick::NotchSnapAngleIsDefault() {
445445
return mNotchSnapAngle == DEFAULT_NOTCH_SNAP_ANGLE;
446446
}
447447

448-
bool ControllerStick::HasMappingsForShipDeviceType(ShipDeviceType shipDeviceType) {
448+
bool ControllerStick::HasMappingsForPhysicalDeviceType(PhysicalDeviceType physicalDeviceType) {
449449
return std::any_of(mAxisDirectionMappings.begin(), mAxisDirectionMappings.end(),
450-
[shipDeviceType](const auto& directionMappings) {
450+
[physicalDeviceType](const auto& directionMappings) {
451451
return std::any_of(directionMappings.second.begin(), directionMappings.second.end(),
452-
[shipDeviceType](const auto& mappingPair) {
453-
return mappingPair.second->GetShipDeviceType() == shipDeviceType;
452+
[physicalDeviceType](const auto& mappingPair) {
453+
return mappingPair.second->GetPhysicalDeviceType() == physicalDeviceType;
454454
});
455455
});
456456
}

src/controller/controldevice/controller/ControllerStick.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ class ControllerStick {
1818
~ControllerStick();
1919

2020
void ReloadAllMappingsFromConfig();
21-
void AddDefaultMappings(ShipDeviceType shipDeviceType);
21+
void AddDefaultMappings(PhysicalDeviceType physicalDeviceType);
2222

2323
void ClearAllMappings();
24-
void ClearAllMappingsForDeviceType(ShipDeviceType shipDeviceType);
24+
void ClearAllMappingsForDeviceType(PhysicalDeviceType physicalDeviceType);
2525
void UpdatePad(int8_t& x, int8_t& y);
2626
std::shared_ptr<ControllerAxisDirectionMapping> GetAxisDirectionMappingById(Direction direction, std::string id);
2727
std::unordered_map<Direction, std::unordered_map<std::string, std::shared_ptr<ControllerAxisDirectionMapping>>>
@@ -54,7 +54,7 @@ class ControllerStick {
5454
bool ProcessKeyboardEvent(KbEventType eventType, KbScancode scancode);
5555
bool ProcessMouseButtonEvent(bool isPressed, Ship::MouseBtn button);
5656

57-
bool HasMappingsForShipDeviceType(ShipDeviceType shipDeviceType);
57+
bool HasMappingsForPhysicalDeviceType(PhysicalDeviceType physicalDeviceType);
5858
StickIndex GetStickIndex();
5959

6060
private:

src/controller/controldevice/controller/mapping/ControllerAxisDirectionMapping.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
#include <sstream>
55

66
namespace Ship {
7-
ControllerAxisDirectionMapping::ControllerAxisDirectionMapping(ShipDeviceType shipDeviceType, uint8_t portIndex,
7+
ControllerAxisDirectionMapping::ControllerAxisDirectionMapping(PhysicalDeviceType physicalDeviceType, uint8_t portIndex,
88
StickIndex stickIndex, Direction direction)
9-
: ControllerInputMapping(shipDeviceType), mPortIndex(portIndex), mStickIndex(stickIndex), mDirection(direction) {
9+
: ControllerInputMapping(physicalDeviceType), mPortIndex(portIndex), mStickIndex(stickIndex), mDirection(direction) {
1010
}
1111

1212
ControllerAxisDirectionMapping::~ControllerAxisDirectionMapping() {

src/controller/controldevice/controller/mapping/ControllerAxisDirectionMapping.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ enum Direction { LEFT, RIGHT, UP, DOWN };
1313

1414
class ControllerAxisDirectionMapping : virtual public ControllerInputMapping {
1515
public:
16-
ControllerAxisDirectionMapping(ShipDeviceType shipDeviceType, uint8_t portIndex, StickIndex stickIndex,
16+
ControllerAxisDirectionMapping(PhysicalDeviceType physicalDeviceType, uint8_t portIndex, StickIndex stickIndex,
1717
Direction direction);
1818
~ControllerAxisDirectionMapping();
1919
virtual float GetNormalizedAxisDirectionValue() = 0;

0 commit comments

Comments
 (0)