[GH-ISSUE #4621] PPSSPP SDL version joystick not activating #1904

Closed
opened 2026-03-18 05:05:18 +03:00 by kerem · 9 comments
Owner

Originally created by @fastrizwaan on GitHub (Nov 23, 2013).
Original GitHub issue: https://github.com/hrydgard/ppsspp/issues/4621

The joystick is not woking in SDL version but works in Qt version - 595 git.

Originally created by @fastrizwaan on GitHub (Nov 23, 2013). Original GitHub issue: https://github.com/hrydgard/ppsspp/issues/4621 The joystick is not woking in SDL version but works in Qt version - 595 git.
kerem closed this issue 2026-03-18 05:05:24 +03:00
Author
Owner

@Bigpet commented on GitHub (Nov 24, 2013):

I'm a little confused about this. Functionally nothing really changed. What gamepad are you using? My PS3 pad has an issue with the default configuration, it maps one of the motion sensing axis to X which makes it REALLY REALLY hard to configure anything but otherwise everything works.

I guess I could try to include a dead-zones option

<!-- gh-comment-id:29146751 --> @Bigpet commented on GitHub (Nov 24, 2013): I'm a little confused about this. Functionally nothing really changed. What gamepad are you using? My PS3 pad has an issue with the default configuration, it maps one of the motion sensing axis to X which makes it REALLY REALLY hard to configure anything but otherwise everything works. I guess I could try to include a dead-zones option
Author
Owner

@fastrizwaan commented on GitHub (Nov 24, 2013):

v0.9.5-567-gfa78718 Sacha 2013-11-22 07:15:10 Download Download Download Qt: Put all resources in to the binary. The app should be standalone now. Also fixes #4615
v0.9.5-567-g80d7113 Peter Tissen 2013-11-22 02:25:44 No build bump native version
v0.9.5-566-gd892f70 Sacha 2013-11-22 05:05:36 Download Download Download Qt: Cleanup the menu creation even more. Use classes instead of defines. Now automatically translates and sets state. Update translations.
v0.9.5-566-g746a88c Peter Tissen 2013-11-05 13:49:23 No build enable SDL Joystick support to QtCmake file update add new SDL joystick files

My joystick is PS2 gamepad, using ps2 to usb converter.
as can be seen here:
http://www.ebay.com/itm/Dual-PS2-PlayStation-2-Game-Controller-Joystick-To-USB-Converter-For-PC-Laptop-/390666992377
http://www.ebay.com/itm/Dual-PS-PS2-II-Controller-Console-To-USB-Converter-Adapter-For-PC-Game-/271260920461
mz8adwwph1gi-i6pc_rpreg

t2ec16r yme9s5qg uqbseesg 5n 60_35

and yes, my default gamepad keys are also in wrong order except the axis.

<!-- gh-comment-id:29146870 --> @fastrizwaan commented on GitHub (Nov 24, 2013): v0.9.5-567-gfa78718 Sacha 2013-11-22 07:15:10 Download Download Download Qt: Put all resources in to the binary. The app should be standalone now. Also fixes #4615 v0.9.5-567-g80d7113 Peter Tissen 2013-11-22 02:25:44 No build bump native version v0.9.5-566-gd892f70 Sacha 2013-11-22 05:05:36 Download Download Download Qt: Cleanup the menu creation even more. Use classes instead of defines. Now automatically translates and sets state. Update translations. v0.9.5-566-g746a88c Peter Tissen 2013-11-05 13:49:23 No build enable SDL Joystick support to QtCmake file update add new SDL joystick files My joystick is PS2 gamepad, using ps2 to usb converter. as can be seen here: http://www.ebay.com/itm/Dual-PS2-PlayStation-2-Game-Controller-Joystick-To-USB-Converter-For-PC-Laptop-/390666992377 http://www.ebay.com/itm/Dual-PS-PS2-II-Controller-Console-To-USB-Converter-Adapter-For-PC-Game-/271260920461 ![mz8adwwph1gi-i6pc_rpreg](https://f.cloud.github.com/assets/1161682/1607879/a812e1a6-54ab-11e3-9fa6-b91d56749efc.jpg) ![t2ec16r yme9s5qg uqbseesg 5n 60_35](https://f.cloud.github.com/assets/1161682/1607881/b58b857c-54ab-11e3-88be-6034fca384c2.JPG) and yes, my default gamepad keys are also in wrong order except the axis.
Author
Owner

@Bigpet commented on GitHub (Nov 24, 2013):

hm nothing should've changed but I only opened the very first joystick on the list (as it was before, I will change that in the future though). Could you try to plug in your gamepad into the other slot to see if it's recognized.

<!-- gh-comment-id:29146917 --> @Bigpet commented on GitHub (Nov 24, 2013): hm nothing should've changed but I only opened the very first joystick on the list (as it was before, I will change that in the future though). Could you try to plug in your gamepad into the other slot to see if it's recognized.
Author
Owner

@fastrizwaan commented on GitHub (Nov 24, 2013):

changing joystick slot did not help, but worked with Qt,

Now SDL doesn't work but Qt works, earlier it was vice versa :D

These are the correct Gamepad contol settings, could you please try to import them for Original PS2 controller connected using ps2 to usb converter.

[rizvan@localhost ~]$ cat /home/rizvan/.ppsspp/PSP/SYSTEM/controls.ini
[ControlMapping]
Up = 1-19,10-4033
Down = 1-20,10-4032
Left = 1-21,10-4031
Right = 1-22,10-4030
Circle = 1-52,10-20
Cross = 1-54,10-21
Square = 1-29,10-22
Triangle = 1-47,10-19
Start = 1-62,10-195
Select = 1-66,10-194
L = 1-45,10-192
R = 1-51,10-193
An.Up = 1-37,10-4003
An.Down = 1-39,10-4002
An.Left = 1-38,10-4001
An.Right = 1-40,10-4000
RapidFire = 1-59
Unthrottle = 1-61
SpeedToggle = 1-68
Pause = 1-111
RightAn.Up = 10-4023
RightAn.Down = 10-4022
RightAn.Left = 10-4029
RightAn.Right = 10-4028


UPDATE:

The above setting also works with USB joystick along with Sony origininal joysticks


[rizvan@localhost build]$ ./SDLJoyTest-linux32
There are 1 joysticks attached
Joystick 0: DragonRise Inc. Generic USB Joystick
axes: 5
balls: 0
hats: 1
buttons: 12


[rizvan@localhost build]$ ./SDLJoyTest-linux32
There are 2 joysticks attached
Joystick 0: Twin USB Joystick
axes: 4
balls: 0
hats: 1
buttons: 12
Joystick 1: Twin USB Joystick
axes: 4
balls: 0
hats: 1

buttons: 12

<!-- gh-comment-id:29146988 --> @fastrizwaan commented on GitHub (Nov 24, 2013): changing joystick slot did not help, but worked with Qt, Now SDL doesn't work but Qt works, earlier it was vice versa :D These are the correct Gamepad contol settings, could you please try to import them for Original PS2 controller connected using ps2 to usb converter. [rizvan@localhost ~]$ cat /home/rizvan/.ppsspp/PSP/SYSTEM/controls.ini [ControlMapping] Up = 1-19,10-4033 Down = 1-20,10-4032 Left = 1-21,10-4031 Right = 1-22,10-4030 Circle = 1-52,10-20 Cross = 1-54,10-21 Square = 1-29,10-22 Triangle = 1-47,10-19 Start = 1-62,10-195 Select = 1-66,10-194 L = 1-45,10-192 R = 1-51,10-193 An.Up = 1-37,10-4003 An.Down = 1-39,10-4002 An.Left = 1-38,10-4001 An.Right = 1-40,10-4000 RapidFire = 1-59 Unthrottle = 1-61 SpeedToggle = 1-68 Pause = 1-111 RightAn.Up = 10-4023 RightAn.Down = 10-4022 RightAn.Left = 10-4029 RightAn.Right = 10-4028 --- UPDATE: The above setting also works with USB joystick along with Sony origininal joysticks --- [rizvan@localhost build]$ ./SDLJoyTest-linux32 There are 1 joysticks attached Joystick 0: DragonRise Inc. Generic USB Joystick axes: 5 balls: 0 hats: 1 buttons: 12 --- [rizvan@localhost build]$ ./SDLJoyTest-linux32 There are 2 joysticks attached Joystick 0: Twin USB Joystick axes: 4 balls: 0 hats: 1 buttons: 12 Joystick 1: Twin USB Joystick axes: 4 balls: 0 hats: 1 ## buttons: 12
Author
Owner

@fastrizwaan commented on GitHub (Nov 24, 2013):

pcsxr PSX emulator assigns the game pad keys nicely in Linux, try your game pad with this emulator
http://pcsxr.codeplex.com/

here's the source:
http://pcsxr.codeplex.com/SourceControl/latest#pcsxr/plugins/dfinput/sdljoy.c
http://pcsxr.codeplex.com/SourceControl/latest#pcsxr/plugins/dfinput/cfg.c
http://pcsxr.codeplex.com/SourceControl/latest#pcsxr/plugins/dfinput/pad.h

<!-- gh-comment-id:29147247 --> @fastrizwaan commented on GitHub (Nov 24, 2013): pcsxr PSX emulator assigns the game pad keys nicely in Linux, try your game pad with this emulator http://pcsxr.codeplex.com/ here's the source: http://pcsxr.codeplex.com/SourceControl/latest#pcsxr/plugins/dfinput/sdljoy.c http://pcsxr.codeplex.com/SourceControl/latest#pcsxr/plugins/dfinput/cfg.c http://pcsxr.codeplex.com/SourceControl/latest#pcsxr/plugins/dfinput/pad.h
Author
Owner

@Bigpet commented on GitHub (Nov 24, 2013):

too bad that my brother currently has my usb converter and PS2 controllers. I'm going to try my DDR mats

<!-- gh-comment-id:29147394 --> @Bigpet commented on GitHub (Nov 24, 2013): too bad that my brother currently has my usb converter and PS2 controllers. I'm going to try my DDR mats
Author
Owner

@Bigpet commented on GitHub (Nov 24, 2013):

huh it may just be that I actually forgot to commit the changes in the cmakefile

edit: nvm I'm just stupid and didn't update git correctly on my linux machine

I can reproduce the issue now

<!-- gh-comment-id:29147679 --> @Bigpet commented on GitHub (Nov 24, 2013): huh it may just be that I actually forgot to commit the changes in the cmakefile edit: nvm I'm just stupid and didn't update git correctly on my linux machine I can reproduce the issue now
Author
Owner

@xsacha commented on GitHub (Nov 24, 2013):

It looks like the code is failing for non-C++11 on older compilers:
https://travis-ci.org/hrydgard/ppsspp/jobs/14436435

/home/travis/build/hrydgard/ppsspp/SDL/SDLJoystick.h:94:23: sorry, unimplemented: non-static data member initializers
/home/travis/build/hrydgard/ppsspp/SDL/SDLJoystick.h:94:23: error: ‘constexpr’ needed for in-class initialization of static data member ‘thread’ of non-integral type

<!-- gh-comment-id:29148823 --> @xsacha commented on GitHub (Nov 24, 2013): It looks like the code is failing for non-C++11 on older compilers: https://travis-ci.org/hrydgard/ppsspp/jobs/14436435 /home/travis/build/hrydgard/ppsspp/SDL/SDLJoystick.h:94:23: sorry, unimplemented: non-static data member initializers /home/travis/build/hrydgard/ppsspp/SDL/SDLJoystick.h:94:23: error: ‘constexpr’ needed for in-class initialization of static data member ‘thread’ of non-integral type
Author
Owner

@Bigpet commented on GitHub (Nov 24, 2013):

yeah, that's slightly unrelated but it's true, I'll make pull request that includes a change that'll let it compile after I figured out the actual reason why the input doesn't work

edit: omg why am I so retarded sometime got the error, will make the pull request shortly

<!-- gh-comment-id:29148988 --> @Bigpet commented on GitHub (Nov 24, 2013): yeah, that's slightly unrelated but it's true, I'll make pull request that includes a change that'll let it compile after I figured out the actual reason why the input doesn't work edit: omg why am I so retarded sometime got the error, will make the pull request shortly
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ppsspp#1904
No description provided.