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

Add missing GUIDs for 8BitDo Pro 2 Controller in XInput mode #779

Closed
wants to merge 1 commit into from

Conversation

Zekromaster
Copy link

@Zekromaster Zekromaster commented Aug 11, 2024

These two are the GUIDs that the 8Bit Do Pro 2 wireless gamepad uses in wireless and wired mode when using XInput. The first one got misidentified as 8Bit Do Zero 2 by some software using the DB, which led me to realise there was some ambiguity which led me to realise this meant the DB didn't contain these specific mappings.

@offalynne
Copy link
Collaborator

offalynne commented Aug 11, 2024

The GUID format is wrong. You need to remove the CRC, by zeroing chars 5-8 inclusive so for example 050095ac5e040000e002000003090000 becomes 050000005e040000e002000003090000. When correctly formatted, these GUIDs are duplicates and match existing maps in the db, making this PR redundant.

The mappings in this PR do not correlate to mappings for the 8BitDo Zero 2. The closest is 050000005e040000e002000030110000, but since you have not produced that GUID yourself with whatever method you have authored these maps, I have no confidence this matches your issue.

This is the third of three bad PRs I have closed regarding this. Please do not open another unless you have confirmed what is wrong and tested that your change does in fact correct the problem. If the issue is downstream software, take it up with maintainers of that software.

@offalynne offalynne closed this Aug 11, 2024
@Zekromaster
Copy link
Author

Oh, didn't realise that. The change did in fact correct the problem, but I assume this just means that the downstream software is not using the mappings correctly.

@offalynne
Copy link
Collaborator

offalynne commented Aug 11, 2024

Try removing your changes, test, replace the mapping entry linked above with yours, leaving the original GUID (050000005e040000e002000030110000) alone, test again to confirm if that fixes.

@Zekromaster
Copy link
Author

Zekromaster commented Aug 11, 2024

Can confirm this also resolves the issue

Somehow SDL tool gives me a GUID of 050000005e040000e002000003090000, but other software is giving me the mappings for 050000005e040000e002000030110000 instead. Some truncation going on, maybe?

Gonna report the issue to downstream, sorry for the PR.

@Zekromaster
Copy link
Author

Zekromaster commented Aug 11, 2024

I seem to only be able to actually reproduce any issue when the file contains the following three mappings, all coming from the current db:

050000005e040000e002000030110000,8BitDo Zero 2,a:b0,b:b1,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Linux,
050000005e040000e002000003090000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
050082795e040000e002000003090000,Xbox One S 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,

This could very well be an issue with SDL, but might be worth asking here before opening an issue there. There seem to be two mappings that are the same GUID, differing only in CRC. It is my understanding from this PR's closing message that this isn't supposed to happen, but maybe it is in certain circumstances?

@offalynne
Copy link
Collaborator

offalynne commented Aug 12, 2024

Correct, the 050082795e040000e002000003090000 entry is in error and will be removed.

the following three

This is indeed most likely a downstream issue.

If you remove only the first and last mappings does it resolve the issue ?

@Zekromaster
Copy link
Author

Yes, it does. But the downstream software is only setting the SDL hint pointing to the mappings file, so if this is unexpected behaviour the problematic downstream producing it is SDL itself.

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