libretro / RetroArch

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

Weird interaction when using both remote and Dualshock 4 gamepad on Nvidia SHIELD #7615

Open SausageDog opened 5 years ago

SausageDog commented 5 years ago

First and foremost consider this:

Description

This issue seems like it's similar to issue 6046 which was a fix specifically for NVidia Shield controllers https://github.com/libretro/RetroArch/issues/6046

Basically when you first install Retroarch on the Shield TV, if you launch it using a Dualshock 4 then it behaves exactly as you would expect it to on Windows. The controller is registered as device #0, The XMB is controlled by the controller, navigation works normally, X button is accept, and O button is back.

However the moment you use the Shield Remote in Retroarch, it will bump the DS4 to controller index #1, the Shield Remote becomes controller #0, and the DS4 buttons are now swapped to O button being accept and X button being back.

In addition, the controller will become unresponsive when entering or exiting a game and require the remote buttons to be pressed in order to activate the controller before Retroarch will accept input from it.

Expected behavior

Controller should not become unresponsive when entering or exiting a game. Controller accept/cancel buttons should not swap just because remote was used.

Actual behavior

See bug description.

Steps to reproduce the bug

  1. Install Retroarch
  2. Launch Retroarch with DS4 controller
  3. Use Shield Remote while in Retroarch menu.
  4. Try using DS4. It has been reassigned to index #1 and buttons are reversed.

Version/Commit

You can find this information under Information/System Information

Current official Play Store version.

Environment information

orbea commented 5 years ago

@SausageDog Can you see if this is still a problem with the nightlies?

SausageDog commented 5 years ago

Hi,

I tested with the 2018-12-27 nightly, and the behavior has changed now. If the Shield Remote is used to start a game, it will take over controller port 0 and will not relinquish it even if buttons are pressed on the game controller (which will be assigned to port 1). If the game controller is used to start a game, it will control the game normally as long as the Shield remote is not touched. If the Shield Remote is used after a game is opened with the game controller, it will take over as player one and will not relinquish it back to the game controller even if buttons are pressed on the game controller.

In addition the accept/cancel buttons in Retroarch menus are still swapped on the game controller if the Shield Remote is used.

It seems like Retroarch is treating the Shield Remote as a special case rather than how it would treat any other controller resulting in unpredictable behavior for the user. I assume this is unique to the Shield platform and this input device in particular.

Without knowing what's going on in Retroarch behind the scenes I would suggest that your typical user would expect to be able to use the Shield Remote to navigate Retroarch menus, but would never want or expect it to be used to control a game. In a standard Retroarch installation, controllers don't battle each other for port 0 and I think that's the underlying issue here. The Shield Remote should act more or less like a keyboard, rather than a controller. And if it must be treated as a controller, it should be well-behaved like other controllers are in Retroarch and not hijack controller ports while in-game.

orbea commented 5 years ago

Thanks for the update, unfortunately I don't have a shield or any similar remotes so I can't help much. Hopefully someone else will...

DaTedinator commented 5 years ago

I'm having the same issue. Tested with a DS4, HORI Battlepad, and an xbox 360 wireless controller: all of them have the same result of swapping the A and B buttons. To be more specific, I think it's not actually swapping the buttons, but not honoring the "Swap A and B buttons in menus" option, because once the remote has been used, nothing changes regardless of what setting that's on.