libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.4k stars 1.84k forks source link

unpleasant/unwanted behavior with input selection #3014

Open meleu opened 8 years ago

meleu commented 8 years ago

This isn't exactly a bug, but an unpleasant (and unwanted) behavior with the input selection. I'm talking about what is done at "Settings -> Input -> Input User N Binds -> User N Device Index". It has a little weird behavior: it changes the input instantaneously! OK, changing the configs instantaneously is the expected behavior, but with the input device it can bring weird situations. I have 2 examples of how this is unpleasant.

Example 1: I was using RetroArch on my Android phone with an ipega bluetooth controller. And went to the "Input User 1 Binds" to change some buttons, while navigating through the menu I accidentaly pressed Right while in "User 1 Device Index" and lost the control of RetroArch through the ipega controller.

And this field can't be changed with only the touch screen. Hours later I had the idea to enable "Display Overlay" and disable "Hide Overlay in Menu" and used the touch-screen joystick to change back the "User 1 Device Index" to my ipega.

Example 2: I have a Raspberry Pi with the following scenario:

RetroArch recognizes the adapter as two joysticks (Twin USB Joystick #1 and Twin USB Joystick #2) even if there is no joysticks plugged into it. Well, I was using my PlayStation 2 controller as Twin USB Joystick #1, and wanted to change the "User 1 Device Index" to my 8Bitdo controller. I pressed Right, it changed to Twin USB Joystick #2 and I lost control of RetroArch.

I had to exit RetroArch and manually change the input_player1_joypad_index in retroarch.cfg file to get the control back.

So, that's why I think it would be really useful a way to let the user see all the available input devices before choosing.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/34422090-unpleasant-unwanted-behavior-with-input-selection?utm_campaign=plugin&utm_content=tracker%2F296058&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F296058&utm_medium=issues&utm_source=github).
meleu commented 8 years ago

I friend of mine reported a worse case:

He uses NVIDIA SHIELD (Android). And this console have no touch screen. So if he loses the RetroArch control changing the "User 1 Device Index", he needs to restart the RetroArch configs with the "factory settings".

Dinierto commented 8 years ago

Yes this is all related to the same set of problems. I have a Shield Android TV and it hasn't set up my XBOX 360 wireless controller correctly. I have no way to fix the bindings from within retroarch, however, because only the D-Pad works. If I start RA with another controller, and then select the Xbox gamepad to configure it, then menu control is handed back to the Xbox gamepad (which can't operate the menu). It's a vicious cycle.

Dinierto commented 8 years ago

I will try it again, this was a while ago. It's a wireless controller with the official MS dongle, not a wired one. I'll post my results.

Dinierto commented 8 years ago

Okay I got it to work. When I first went into RA, I had my bluetooth 8bitdo gamepad on. I turned on the 360 Wireless controller. At this point I lost all control of the menu system. I was able to go home and close Retroarch. Then I enabled first my bluetooth gamepad, then the 360 wireless gamepad, and THEN started RA. I was now able to configure the 360 gamepad properly.

By the way, the R2 button seems to be omitted from the "bind all" sequence. It goes L2, L3, then R3. You can witness this in the video that fr500 posted.

So now I have a new problem since the 360 pad is working. The current hotkey binds are set to buttons on my 8bitdo gamepad. These seem to be set to keys rather than retropad buttons, so that when I use the 360 controller I have no hotkeys. If I set the hotkeys to the 360 gamepad, I lose the bindings to the 8bitdo. Is there a solution to this that I'm missing?

meleu commented 8 years ago

R2 button seems to be omitted from the "bind all" sequence.

It's not true. I also thought that, but then I realized that the L2 was detected twice. I think it's because of the analog trigger.

The current hotkey binds are set to buttons on my 8bitdo gamepad. These seem to be set to keys rather than retropad buttons

Indeed. This is the reason of the problem, the keys are set to button number rather than retropad buttons. I also suffer with it when playing on Android.

Should we open another issue with this feature request?: "Link the hotkeys buttons to RetroPad rather than joystick button numbers."

Dinierto commented 8 years ago

Should we open another issue with this feature request?: "Link the hotkeys buttons to RetroPad rather than joystick button numbers."

I think so. Otherwise there doesn't seem to be a way to configure hotkeys on multiple controllers.

Dinierto commented 8 years ago

Ahh I see. Yeah it would be much simpler if you could set them to RetroPad buttons. At least with editing the profiles there is a way, though. I don't actually use my 360 pad that much, but I wanted to mention the issue for general posterity.

meleu commented 8 years ago

Somebody already did it! I tagged you there. ;-)

meleu commented 8 years ago

I think that when the changes made in the PR #3499 reach the Google Play's version of RetroArch, it will be enough to solve the issues I described in the first post of this issue thread.

P.S.: it's important to make the option implemented on the PR #3499 accessible via menu. Android users rarely edit retroarch.cfg manually.