@Zing Hi, I did the test in the two devices RPi4 and RPi3 with the two controllers connected, the generic one and PS3 controller.
The output of the command in RPi4 is the following:
# sdl2-jstest --list
error: failed to read gamecontrollerdb.txt: Invalid RWops
Found 1 joystick(s)
Joystick Name: 'DragonRise Inc. Generic USB Joystick '
Joystick Path: '/dev/input/event0'
Joystick GUID: 03000000790000000600000010010000
Joystick Number: 0
Number of Axes: 5
Number of Buttons: 12
Number of Hats: 1
Number of B***s: 0
GameControllerConfig:
Name: 'DragonRise Inc. Generic USB Joystick'
Mapping: '03000000790000000600000010010000,DragonRise Inc. Generic USB Joystick,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b3,y:b0,'
Axis code 0: 0
Axis code 1: 1
Axis code 2: 2
Axis code 3: 3
Axis code 4: 5
Button code 0: 288
Button code 1: 289
Button code 2: 290
Button code 3: 291
Button code 4: 292
Button code 5: 293
Button code 6: 294
Button code 7: 295
Button code 8: 296
Button code 9: 297
Button code 10: 298
Button code 11: 299
Hat code 0: 16
When I did the same test on RPi3, the output was the Following:
# sdl2-jstest --list
error: failed to read gamecontrollerdb.txt: Invalid RWops
Found 2 joystick(s)
Joystick Name: 'PS3 Controller'
Joystick Path: '/dev/input/event2'
Joystick GUID: 030000004c0500006802000011810000
Joystick Number: 0
Number of Axes: 6
Number of Buttons: 17
Number of Hats: 0
Number of B***s: 0
GameControllerConfig:
Name: 'PS3 Controller'
Mapping: '030000004c0500006802000011810000,PS3 Controller,a:b0,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b16,dpup:b13,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,'
Axis code 0: 0
Axis code 1: 1
Axis code 2: 2
Axis code 3: 3
Axis code 4: 4
Axis code 5: 5
Button code 0: 304
Button code 1: 305
Button code 2: 307
Button code 3: 308
Button code 4: 310
Button code 5: 311
Button code 6: 312
Button code 7: 313
Button code 8: 314
Button code 9: 315
Button code 10: 316
Button code 11: 317
Button code 12: 318
Button code 13: 544
Button code 14: 545
Button code 15: 546
Button code 16: 547
Joystick Name: 'DragonRise Inc. Generic USB Joystick '
Joystick Path: '/dev/input/event1'
Joystick GUID: 03000000790000000600000010010000
Joystick Number: 1
Number of Axes: 5
Number of Buttons: 12
Number of Hats: 1
Number of B***s: 0
GameControllerConfig:
Name: 'DragonRise Inc. Generic USB Joystick'
Mapping: '03000000790000000600000010010000,DragonRise Inc. Generic USB Joystick,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b3,y:b0,'
Axis code 0: 0
Axis code 1: 1
Axis code 2: 2
Axis code 3: 3
Axis code 4: 5
Button code 0: 288
Button code 1: 289
Button code 2: 290
Button code 3: 291
Button code 4: 292
Button code 5: 293
Button code 6: 294
Button code 7: 295
Button code 8: 296
Button code 9: 297
Button code 10: 298
Button code 11: 299
Hat code 0: 16