Rosalie241 / RMG

Rosalie's Mupen GUI
GNU General Public License v3.0
611 stars 52 forks source link

Dpad input problem with "Retrolink N64 USB Controller" #135

Closed acepow3r closed 1 year ago

acepow3r commented 1 year ago

As the title indicates I have a problem with the aforementioned controller's dpad, and the last update (0.4.0) of RMG. This is a USB lookalike-clone of a real N64 controller.

The dpad's presses aren't recognized at all in the configuration dialog, despite that all the other buttons and axis work perfectly fine. I can configure all the buttons except the dpad. This was not the case with the previous version (0.3.9) of RMG, where all the buttons and the dpad worked fine.

I have to mention that in the previous version(s) of RMG, the controller was recognized -incorrectly- as a "G-Shark GS-GP702" but this is not happening anymore in RMG 0.4.0, that recognizes it correctly as Generic USB Joystick. (I have opened the issue #81 in the past, about the wrong naming for this controller and I thought that maybe it will be helpful to mention, that the wrong name issue does not happen anymore, but the functionality of dpad is now broken. Maybe they are related?)

The controller works absolutely fine, on the Windows 10 "Properties for Generic USB Joystick" and also on other emulators like RetroArch's Mupen64plus core, Project64 and even RMG prior version 0.4.0

Rosalie241 commented 1 year ago

Can you try the following to see if that helps?

1) try rebinding the dpad buttons in RMG-Input 2) if that doesn't work, go to options in RMG-Input, then open the User Interface tab and disable Filter Events Based On Joystick Type For Buttons, then try rebinding the dpad in RMG-Input

I hope that'll solve the issue because I'm uncertain what else it could be!

acepow3r commented 1 year ago

Sorry to hear that! Unfortunately tried both suggestions beforehand but they didn't do the trick... Tried again now with the addition of the deletion of the input profile entirely, but also didn't worked. All the button presses work fine except those of the dpad.

Rosalie241 commented 1 year ago

Can you try going to the Data directory next to the RMG executable and remove the gamecontrollerdb.txt file, then restart RMG and try rebinding the buttons?

acepow3r commented 1 year ago

Removed gamecontrollerdb.txt from data directory: No change. All buttons work except from dpad's

Rosalie241 commented 1 year ago

Someone in the RMG discord mentioned that replacing SDL2.dll with the dll from version v0.3.9 fixed it for them, can you try that?

acepow3r commented 1 year ago

Yes! That worked! The dpad works now. But this solution brought up the old issue #81 of naming the Retrolink N64 gamepad as "G-Shark GS-GP702" and the odd naming of button presses as triggers. I think it is the same issue as issue #127

Yui12 commented 1 year ago

Yeah it worked for me too, replacing SDL2.dll with that older one from 0.3.9 since my dpad wasn't working with my generic N64 USB controller. It thinks it is a G-Shark GS-GP702 for whatever reason, but it works now again. So now everytime I update I have to use SDL2.dll from 0.3.9 now I guess until we get a fix.

Rosalie241 commented 1 year ago

Please try this build: https://github.com/Rosalie241/RMG/actions/runs/5725438531

And disable Filter Events Based On Joystick Type For Buttons

It'll hopefully work because I implemented joystick hats now.

acepow3r commented 1 year ago

Please try this build: https://github.com/Rosalie241/RMG/actions/runs/5725438531

And disable Filter Events Based On Joystick Type For Buttons

It'll hopefully work because I implemented joystick hats now.

YES! It Works! Also doesn't seem to affect the "Filter Events Based On Joystick Type For Buttons" option, works either way.

The only very little problem is when I test the dpad inside the Input Configuration when I press one direction, it appears that all the buttons are pressed at once. Doesn't affect the gameplay though. You can see it in the screenshot below.

rmg

Yui12 commented 1 year ago

It somewhat works for me as the d-pad doesn't sense diagonal motions. The game Mischief Makers really will test your D-Pad since it is one of the few D-pad heavy games on the N64 you can test it with. The D-pad inputs are invisible when mapping them but that is a minor thing.

acepow3r commented 1 year ago

Yes you're right. There are no diagonals. The movement is stalling when I try diagonals. Sorry, I only tried Tetris before but even then, when I pressed down for the piece to go down faster, if there was accidentally a little bit diagonal then the fast moving stops...

Yui12 commented 1 year ago

Hmm I see. The old prior workaround was fine for me anyway, but thanks for trying

Rosalie241 commented 1 year ago

Can you try https://github.com/Rosalie241/RMG/actions/runs/5708070530 to see if that does work with diagonals?

Yui12 commented 1 year ago

Can you try https://github.com/Rosalie241/RMG/actions/runs/5708070530 to see if that does work with diagonals?

It is worse. The diagonals don't' work at all except for the up motion. I notice that when I was mapping buttons that all of the buttons where pressed at once similar to the picture a few messages above.

Rosalie241 commented 1 year ago

I'm sorry for asking to test so many builds, but could someone test the following build? It should at the very least have the configuration GUI's visualization fixed, and hopefully diagonals aswell!

https://github.com/Rosalie241/RMG/actions/runs/5758321453

acepow3r commented 1 year ago

No don't be sorry, I'm very happy from your hard work to support us. Now to the point. Yes it works. Tried with Xeno Crisis and the diagonals works pretty much ok. The only little problem again is with the GUI, when I test the buttons from the dpad, they stay lit even if they are not pressed. doesn;t happen with other buttons. See screenshot rmg

Rosalie241 commented 1 year ago

Thank you for testing, seems like I made some progress!

I reworked the joystick hat handling in the configuration GUI of RMG-Input so the following build should hopefully work correctly there now!

https://github.com/Rosalie241/RMG/actions/runs/5770305441

Yui12 commented 1 year ago

Thank you for testing, seems like I made some progress!

I reworked the joystick hat handling in the configuration GUI of RMG-Input so the following build should hopefully work correctly there now!

https://github.com/Rosalie241/RMG/actions/runs/5770305441

Okay this build works with my D-Pad once more. Thanks for fixing this issue.

Rosalie241 commented 1 year ago

Does it work correctly in the configuration GUI aswell? Just making sure!

Yui12 commented 1 year ago

Does it work correctly in the configuration GUI aswell? Just making sure!

I forgot to mention that it does now too.

Rosalie241 commented 1 year ago

Thank you a lot for all the testing! The fix has been included in v0.4.7, and with that I think I can safely close this issue now, feel free to comment/re-open this issue if needed though!

Thank you all :heart: