@@ -86,28 +86,28 @@ void Controller::ClearAllMappings() {
86
86
GetLED ()->ClearAllMappings ();
87
87
}
88
88
89
- void Controller::ClearAllMappingsForDeviceType (ShipDeviceType shipDeviceType ) {
89
+ void Controller::ClearAllMappingsForDeviceType (PhysicalDeviceType physicalDeviceType ) {
90
90
for (auto [bitmask, button] : GetAllButtons ()) {
91
- button->ClearAllButtonMappingsForDeviceType (shipDeviceType );
91
+ button->ClearAllButtonMappingsForDeviceType (physicalDeviceType );
92
92
}
93
- GetLeftStick ()->ClearAllMappingsForDeviceType (shipDeviceType );
94
- GetRightStick ()->ClearAllMappingsForDeviceType (shipDeviceType );
93
+ GetLeftStick ()->ClearAllMappingsForDeviceType (physicalDeviceType );
94
+ GetRightStick ()->ClearAllMappingsForDeviceType (physicalDeviceType );
95
95
96
96
auto gyroMapping = GetGyro ()->GetGyroMapping ();
97
- if (gyroMapping != nullptr && gyroMapping->GetShipDeviceType () == shipDeviceType ) {
97
+ if (gyroMapping != nullptr && gyroMapping->GetPhysicalDeviceType () == physicalDeviceType ) {
98
98
GetGyro ()->ClearGyroMapping ();
99
99
}
100
100
101
- GetRumble ()->ClearAllMappingsForDeviceType (shipDeviceType );
102
- GetLED ()->ClearAllMappingsForDeviceType (shipDeviceType );
101
+ GetRumble ()->ClearAllMappingsForDeviceType (physicalDeviceType );
102
+ GetLED ()->ClearAllMappingsForDeviceType (physicalDeviceType );
103
103
}
104
104
105
- void Controller::AddDefaultMappings (ShipDeviceType shipDeviceType ) {
105
+ void Controller::AddDefaultMappings (PhysicalDeviceType physicalDeviceType ) {
106
106
for (auto [bitmask, button] : GetAllButtons ()) {
107
- button->AddDefaultMappings (shipDeviceType );
107
+ button->AddDefaultMappings (physicalDeviceType );
108
108
}
109
- GetLeftStick ()->AddDefaultMappings (shipDeviceType );
110
- GetRumble ()->AddDefaultMappings (shipDeviceType );
109
+ GetLeftStick ()->AddDefaultMappings (physicalDeviceType );
110
+ GetRumble ()->AddDefaultMappings (physicalDeviceType );
111
111
112
112
const std::string hasConfigCvarKey =
113
113
StringHelper::Sprintf (CVAR_PREFIX_CONTROLLERS " .Port%d.HasConfig" , mPortIndex + 1 );
@@ -146,25 +146,25 @@ bool Controller::ProcessMouseButtonEvent(bool isPressed, MouseBtn mouseButton) {
146
146
return result;
147
147
}
148
148
149
- bool Controller::HasMappingsForShipDeviceType (ShipDeviceType shipDeviceType ) {
149
+ bool Controller::HasMappingsForPhysicalDeviceType (PhysicalDeviceType physicalDeviceType ) {
150
150
for (auto [bitmask, button] : GetAllButtons ()) {
151
- if (button->HasMappingsForShipDeviceType (shipDeviceType )) {
151
+ if (button->HasMappingsForPhysicalDeviceType (physicalDeviceType )) {
152
152
return true ;
153
153
}
154
154
}
155
- if (GetLeftStick ()->HasMappingsForShipDeviceType (shipDeviceType )) {
155
+ if (GetLeftStick ()->HasMappingsForPhysicalDeviceType (physicalDeviceType )) {
156
156
return true ;
157
157
}
158
- if (GetRightStick ()->HasMappingsForShipDeviceType (shipDeviceType )) {
158
+ if (GetRightStick ()->HasMappingsForPhysicalDeviceType (physicalDeviceType )) {
159
159
return true ;
160
160
}
161
- if (GetGyro ()->HasMappingForShipDeviceType (shipDeviceType )) {
161
+ if (GetGyro ()->HasMappingForPhysicalDeviceType (physicalDeviceType )) {
162
162
return true ;
163
163
}
164
- if (GetRumble ()->HasMappingsForShipDeviceType (shipDeviceType )) {
164
+ if (GetRumble ()->HasMappingsForPhysicalDeviceType (physicalDeviceType )) {
165
165
return true ;
166
166
}
167
- if (GetLED ()->HasMappingsForShipDeviceType (shipDeviceType )) {
167
+ if (GetLED ()->HasMappingsForPhysicalDeviceType (physicalDeviceType )) {
168
168
return true ;
169
169
}
170
170
@@ -175,7 +175,7 @@ std::shared_ptr<ControllerButton> Controller::GetButtonByBitmask(CONTROLLERBUTTO
175
175
return mButtons [bitmask];
176
176
}
177
177
178
- void Controller::MoveMappingsToDifferentController (std::shared_ptr<Controller> newController, ShipDeviceType lusIndex) {
178
+ void Controller::MoveMappingsToDifferentController (std::shared_ptr<Controller> newController, PhysicalDeviceType lusIndex) {
179
179
// todo: remove this entirely
180
180
return ;
181
181
}
0 commit comments