Skip to content

Commit eddfd02

Browse files
controller: add layout for ipega9023
Tested on my Android phone
1 parent b1a8574 commit eddfd02

File tree

4 files changed

+558
-0
lines changed

4 files changed

+558
-0
lines changed

public/images/Ipega9023.svg

Lines changed: 548 additions & 0 deletions
Loading

src/assets/joystick-profiles.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,11 @@ export const availableGamepadToCockpitMaps: { [key in JoystickModel]: GamepadToC
156156
axes: [0, 1, 2, 3],
157157
buttons: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17],
158158
},
159+
[JoystickModel.IpegaPG9023]: {
160+
name: 'Ipega9023',
161+
axes: [0, 1, 2, 3],
162+
buttons: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17],
163+
},
159164
[JoystickModel.XboxOneS_Bluetooth]: {
160165
name: 'Xbox One S',
161166
axes: [0, 1, 2, 3],

src/components/joysticks/JoystickPS.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,15 @@ enum SVGModel {
2525
PS4 = 'PS4',
2626
PS5 = 'PS5',
2727
LogitechExtreme3DPro = 'LogitechExtreme3DPro',
28+
IPEGAPG9023 = 'Ipega9023',
2829
}
2930
3031
const joystickSvgModel = computed(() => {
3132
switch (joystickModel.value) {
3233
case JoystickModel.LogitechExtreme3DPro:
3334
return SVGModel.LogitechExtreme3DPro
35+
case JoystickModel.IpegaPG9023:
36+
return SVGModel.IPEGAPG9023
3437
default:
3538
return SVGModel.PS4
3639
}

src/libs/joystick/manager.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export enum JoystickModel {
2323
XboxController_Wired = 'Xbox controller (wired)',
2424
XboxController_360 = 'Xbox 360 controller',
2525
LogitechExtreme3DPro = 'Logitech Extreme 3D Pro',
26+
IpegaPG9023 = 'Ipega PG-9023',
2627
Unknown = 'Unknown Joystick Model',
2728
}
2829

@@ -35,6 +36,7 @@ const JoystickMapVidPid: Map<string, JoystickModel> = new Map([
3536
['045e:0b12', JoystickModel.XboxController_Wired],
3637
['28de:11ff', JoystickModel.XboxController_360],
3738
['046d:c215', JoystickModel.LogitechExtreme3DPro],
39+
['1949:0402', JoystickModel.IpegaPG9023],
3840
])
3941

4042
// Necessary to add functions

0 commit comments

Comments
 (0)