EverestAPI / Everest

Everest - Celeste Mod Loader / Mod API
https://everestapi.github.io/
MIT License
367 stars 80 forks source link

Switch Pro Controller buttons are swapped on Linux #675

Open Chedski opened 1 year ago

Chedski commented 1 year ago

My mods and Everest install are up to date

Yes

I have recreated the bug with only Everest OR a minimum number of mods enabled

Yes

Describe the bug

Button inputs from Switch Pro Controllers are switched around like this:

Steps to reproduce

  1. Connect a Switch Pro Controller and launch Celeste with Everest
  2. Navigate UI, play a map, or try to change controller bindings. Inputs will not match the pressed buttons.

Expected behavior

The detected input should match the button pressed on the controller.

Operating System

Linux (kernel 6.5.7 with no special controller drivers)

Everest Version

Bug introduced in 4231

Mods required to reproduce

None

Additional context

No response

Kalobi commented 1 year ago

Is this not the case in vanilla?

Chedski commented 1 year ago

When steam input is not used, Pro Controller buttons are both mapped and displayed properly in both vanilla and with Everest 4230. This bug is only present in Everest 4231 and beyond (it is present in latest core as well)

Kalobi commented 1 year ago

@Popax21 I'm guessing this is related to the FNA native lib updates?

Popax21 commented 1 year ago

@Popax21 I'm guessing this is related to the FNA native lib updates?

Was 4230 a native live update? I suspect it might be related to newer SDL2 controller DB files.

Chedski commented 1 year ago

4230 is the last version the bug was not present in, to be clear.

Chedski commented 1 year ago

This is really strange, but this bug is only present in builds from the core branch. Out of the 5 most recent versions, it's present in 4339 (core) and 4334 (core), but not 4338, 4337 (beta), or 4336 (stable).

Popax21 commented 1 year ago

4230 is the last version the bug was not present in, to be clear.

4230 wasn't a core build for context, 4231 (the next build) is a core one. I spend some time digging through the commits around that time, and nothing in there should affect controller / input related things at all. The updated gamecontrollerdb.txt has been shipped since the 22nd of July, while 4231 came out on the 23d of September.

Chedski commented 12 months ago

Bumping this because core is being merged with the rest of the branches soon and this issue has still not been addressed as far as I am aware

Popax21 commented 12 months ago

Bumping this because core is being merged with the rest of the branches soon and this issue has still not been addressed as far as I am aware

Do you maybe have the --use-scancodes launch option set somewhere? (Steam / everest-launch.txt)? That was the only addition in 4231, and the only input related change since a long time.

Chedski commented 12 months ago

No, I launch the game manually with ./Celeste.bin.x68_64

Chedski commented 12 months ago

Now that I think about it, this bug may not have been introduced in 4231; I was not aware of any special differences between core and other builds when I made this bug report

Popax21 commented 12 months ago

Now that I think about it, this bug may not have been introduced in 4231; I was not aware of any special differences between core and other builds when I made this bug report

Could you narrow it down to the first build which introduced this bug then, probably through some binary search-like scheme? Considering the huge amount of commits it would be pretty hard for us to fix the bug otherwise.

Kalobi commented 12 months ago

Are you using a third party controller? It appears that the controller ID you edit in the PR was added in a pull request to handle an 8BitDo controller: https://github.com/gabomdq/SDL_GameControllerDB/pull/650

Popax21 commented 12 months ago

Are you using a third party controller? It appears that the controller ID you edit in the PR was added in a pull request to handle an 8BitDo controller: gabomdq/SDL_GameControllerDB#650

Coincidentally that's the exact controller I use, and in X-mode the buttons are indeed switched - but that's the default configuration of the controller, not a problem of Everest (I created a custom button mapping using their configuration tool to swap them back).

Chedski commented 12 months ago

Are you using a third party controller? It appears that the controller ID you edit in the PR was added in a pull request to handle an 8BitDo controller: gabomdq/SDL_GameControllerDB#650

I am not using a third-party controller, this is a first-party Pro controller.

Kalobi commented 12 months ago

@Popax21 The ID that's the issue here is the one that corresponds to Y mode on the 8BitDo controller.

coolreader18 commented 7 months ago

I do wanna note - it seems it's just the labels that are wrong, now (maybe that was always the case?). The default controls map Confirm to "B" and Cancel to "A", but when I press the A button on my controller it confirms and when I press B it cancels. The defaults for jump and dash (Jump on controller-A/Y and Dash on controller-B) are opposite to what I'm used to (I'm pretty sure the default mapping for the switch version is B to jump and Y to dash but not certain), but those can be remapped easily.

coolreader18 commented 7 months ago

Though weirdly - the default for Talk is "A" / controller-B