Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[xbox-one-s] Add new controller map #709

Merged
merged 3 commits into from
Sep 23, 2023

Conversation

drewgonzales360
Copy link

@drewgonzales360 drewgonzales360 commented Sep 22, 2023

I have an xbox one s controller and my right analog stick was giving me incorrect maps. I used the steam big picture mode to get this. The literal contents of the file were:

	"SDL_GamepadBind"		"03000000de280000ff11000001000000,Steam Virtual Gamepad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000de280000fc11000001000000,Steam Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e040000ea02000011050000,Xbox One S Controller,crc:7982,platform:Linux,a:b0,b:b1,x:b2,y:b3,dpleft:h0.8,dpright:h0.2,dpup:h0.1,dpdown:h0.4,leftx:a0,lefty:a1,leftstick:b9,rightx:a3,righty:a4,rightstick:b10,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,back:b6,start:b7,guide:b8,steam:1,"

This is the output the current setup was giving me.

right stick up: Joypad Axis 4 (Joystick 2 Left)
right stick down: Joypad Axis 4 (Left Trigger)
right stick left: Joypad Axis 3 (Right Stick Up)
right stick right: Joypad Axis 3 (Right Stick Down)

This is my first time contributing here. Could someone help me test this or validate what I'm doing?

Open Question

I have a crc:7982,platform:Linux early in the line of my PR. I also have steam:1 at the end. Is that right?

@offalynne
Copy link
Collaborator

This is my first time contributing here. Could someone help me test this or validate what I'm doing?

Looks OK, you'll need to confirm yourself with the hardware on hand, I suggest grabbing the dedicated test app here http://www.generalarcade.com/gamepadtool/, copying the DB file with the changes I've committed overriding the pack-in gamecontrollerdb.txt file, and confirming the right thumbstick axes are working correctly upon running the app.

@mdqinc mdqinc deleted a comment from Ryochan7 Sep 22, 2023
@offalynne
Copy link
Collaborator

Merging since the mapping matches similar devices, open an issue or another PR if the mapping tests incorrectly for you.

@offalynne offalynne merged commit fc4b33c into mdqinc:master Sep 23, 2023
@drewgonzales360
Copy link
Author

Got it thanks! I wasn't able to test it using the tool you mentioned. In the readme, you also mentioned that it's out of date. Using the sdl docs, I was able to throw together a quick tool to test it and it works.

Thanks for the quick review 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants