mgba-emu / mgba

mGBA Game Boy Advance Emulator
https://mgba.io/
Mozilla Public License 2.0
5.6k stars 769 forks source link

Xbox One Wireless Controller Input Mapping Failure #896

Open Travistyse opened 6 years ago

Travistyse commented 6 years ago

Put simply, I'm currently unable to use this emulator because my controller won't map properly. No matter what I change the controller settings to A will pause the game. It's a double input. Actually, a lot of buttons do this. Basically it sends two inputs - one is what I mapped, the other is whatever is default.

I'm guessing it's because I'm using the Bluetooth functionality (because Micro-Usb cables suck and I don't want to damage the port of the controller) but all I can see in the dropdown is "XInput Controller #1" so I can't be certain. I've tried manually clearing things but hitting refresh undoes my efforts. Additionally, if I clear everything and hit apply, OK, and leave I'm still left with buttons that are mapped? When I go back into the settings and re-check it shows that it's completely unmapped. But I observe that Select and Right Trigger both fast forward the game and A pauses. I've been in the Shortcuts and cleared everything from Gamepad except fastforward on Right Trigger (because I'm not using the button and figured why not). I can't seem to resolve this.

Edit: VirtualBoyAdvance doesn't have this problem so this appears to be a regression? Unfortunately for me VBA also has some weird stuttering or something - the gameplay doesn't feel quite right when compared to MGBA

owenstranathan commented 5 years ago

I know I'm like 2 years late, but I had this problem where my right trigger was double mapped to fastforward the emulation, I did not fix my issue but I worked around it by setting emulation fastforward speed to 1x, Hope this helps some one out there.

speakwithanimals commented 2 years ago

I'm having the exact same issue! I noticed it when trying to name my character in Golden Sun. Controller is showing up as "Xbox One S Controller" in the mapping menu, hit all the buttons, applied. Went into the game and every time I click the "A" button it hits what I guess would be 'start' instead. It could be doing both inputs at the same time and I'm just not seeing it, but it's frustrating! Setting 'A' and 'B' to 'X' and 'Y' respectively makes them both act like the 'B' button should for some reason too. Please let me know if there's some simple fix I can use instead of installing a different emulator. Thanks!

speakwithanimals commented 2 years ago

I feel silly. Seconds after submitting this I saw someone had a similar issue with the switch pro controller: https://github.com/mgba-emu/mgba/issues/1726#issue-598565525

It looks like their fix of also reassigning the start and select buttons works! I set mine to Y and X respectively as a temporary fix, but it'd be nice to know why this issue was happening in the first place.

hope that helps someone!

sudo-sandwich commented 1 year ago

This issue may be caused by Steam: https://superuser.com/questions/1167263/stop-xbox-one-controller-from-controlling-windows-10

Macrored commented 1 year ago

Me, too. I used Bluetooth to connect to the wireless gamepad. mgba recognized the gamepad as "Xbox One S Controller", and then the strange keytyping phenomenon occurred.

Entering the game, I randomly pressed a D-pad, and mgba kept thinking that the D-pad of the gamepad was pressed, but in fact I only pressed the D-pad once. image anim3

I made sure the gamepad was fine, the only thing left was the mgba's adaptation of the gamepad. @endrift

I have always loved mgba and hope this issue can be resolved.

kendofriendo commented 8 months ago

nothing I try is working.

TariqMK commented 2 months ago

I got an SN30 Pro Controller and mGBA recognises it as an Xbox One S controller, but it doesnt detect any of the input at all. I am unable to map any keys since it does not detect anything is being pressed.

Controller works fine with other emulators.

endrift commented 2 months ago

Please try with a recent developer build. Also, do any of you have any third party things installed, like DS4Windows, JoyToKey, AutoHotKey, x360ce, etc running in tandem?

TariqMK commented 2 months ago

Please try with a recent developer build. Also, do any of you have any third party things installed, like DS4Windows, JoyToKey, AutoHotKey, x360ce, etc running in tandem?

I have a portable installation so when I change to the dev build, it downloads a new version and restarts the emulator, but when I go to settings it still thinks that it is on the stable build.

Also, I dont have any of those 3rd party programs installed and never have.

endrift commented 2 months ago

Ignore what it says in settings, it should say what version it is in the header or the about screen.

TariqMK commented 2 months ago

Ignore what it says in settings, it should say what version it is in the header or the about screen.

Ok so to clarify, when it downloads the latest dev build, it doesnt automatically restart as it said it would.

So when I manually open mGBA it still shows the stable version in the header (0.10.3), and when I go to settings, it allows me to go through the loop of downloading the latest dev build again etc.

Essentially it looks like I cant swap over to the dev build in the first place.

endrift commented 2 months ago

Delete the shaders directory and try again. This is a known bug that's been fixed in later versions.

TariqMK commented 2 months ago

Delete the shaders directory and try again. This is a known bug that's been fixed in later versions.

Thanks, that allowed me to upgrade to the dev build flawlessly. However I can report that the exact same issue with the controller input not being detected is still present on the latest dev build (0.11-8486-0484cd5d3

TariqMK commented 2 months ago

One more piece of information to note (sorry for the double post):

When I plug my controller in using a wired USB-C connection, it works fine (as it did in the stable build) and the controller is detected as 'Xbox 360 Controller'. So this issue only affects Bluetooth Controllers using x-input which are detected as 'Xbox One S Controller' from what I can tell.