Skip to content

Commit

Permalink
joystick: Add XboxController_360
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick José Pereira <[email protected]>
  • Loading branch information
patrickelectric authored and rafaellehmkuhl committed Oct 19, 2023
1 parent acbae1e commit fc9d43c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/assets/joystick-profiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ export const availableGamepadToCockpitMaps: { [key in JoystickModel]: GamepadToC
axes: [0, 1, 2, 3],
buttons: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
},
[JoystickModel.XboxController_360]: {
name: JoystickModel.XboxController_360,
axes: [0, 1, 2, 3],
buttons: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
},
[JoystickModel.Unknown]: {
name: 'Standard gamepad',
axes: [0, 1, 2, 3, 4, 5, 6, 7],
Expand Down
2 changes: 2 additions & 0 deletions src/libs/joystick/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export enum JoystickModel {
XboxOneS_Bluetooth = 'Xbox One S (bluetooth)',
XboxController_Bluetooth = 'Xbox controller (bluetooth)',
XboxController_Wired = 'Xbox controller (wired)',
XboxController_360 = 'Xbox 360 controller',
Unknown = 'Unknown Joystick Model',
}

Expand All @@ -31,6 +32,7 @@ const JoystickMapVidPid: Map<string, JoystickModel> = new Map([
['045e:02e0', JoystickModel.XboxOneS_Bluetooth],
['045e:0b13', JoystickModel.XboxController_Bluetooth],
['045e:0b12', JoystickModel.XboxController_Wired],
['28de:11ff', JoystickModel.XboxController_360],
])

// Necessary to add functions
Expand Down

0 comments on commit fc9d43c

Please sign in to comment.