libretro / RetroArch

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

Sony PlayStation Controllers: Device Index mislabeling in Flatpak #16868

Closed davidhedlund closed 1 month ago

davidhedlund commented 1 month ago

Description

In the Flatpak version of RetroArch, Sony PlayStation controllers are incorrectly labeled as "PS[X] Controller" ("Save Controller Profile" generates [controller name].cfg with content input_device = [controller name]) regardless of the Linux kernel version. This issue does not occur with the Appimage version.

For comparison, other controllers such as the Nintendo Switch Pro Controller are correctly identified and saved as "Nintendo Switch Pro Controller.cfg" across sdl2, udev, and linuxraw drivers.

Expected Behavior

Ubuntu MATE 23.04

On Ubuntu MATE 23.04 with Linux kernel 6.2.0, udev, and linuxraw correctly identifies the DualSense and DualShock 4 v2 controllers as "DualSense Wireless Controller" and "Wireless Controller" respectively.

So with sdl2:

Ubuntu MATE 22.04 and Ubuntu MATE 24.04

On Ubuntu MATE 22.04 with Linux kernel 5.19.0 and Ubuntu MATE 24.04 with Linux kernel 6.8.0, udev, and linuxraw correctly identifies the DualSense and DualShock 4 v2 controllers as "Sony Interactive Entertainment DualSense Wireless Controller" and "Sony Interactive Entertainment Wireless Controller" respectively.

So with sdl2:

Steps to Reproduce the Bug

  1. Follow the controller guide to change the Controller Profiles directory.
  2. Go to Settings -> Drivers -> Controller and set it to "sdl2".
  3. Connect a PlayStation 4 or PlayStation 5 controller.
  4. Navigate to Settings -> Input -> RetroPad Binds -> Port 1 Controls.
  5. Connect a DualSense controller and click "Save Controller Profile". It will save as "PS5 Controller.cfg".
  6. Disconnect the DualSense controller.
  7. Connect a DualShock 4 v2 controller and click "Save Controller Profile". It will save as "PS4 Controller.cfg".

Version/Commit

Environment Information

gouchi commented 1 month ago

There is an issue with udev on Flatpak so they switch to SDL2.

It seems it is the name given by the SDL2 Game controller community database. You can check it using SDL2 Gamepad Mapper.

So I am not sure we can change it.

RobLoach commented 1 month ago

What gouchi said. The filename that is saved is determined by the input driver, and not a symptom of RetroArch itself. Feel free to rename the file to what you want it to be and send it in a PR to https://github.com/libretro/retroarch-joypad-autoconfig/

davidhedlund commented 1 month ago

What gouchi said. The filename that is saved is determined by the input driver, and not a symptom of RetroArch itself. Feel free to rename the file to what you want it to be and send it in a PR to https://github.com/libretro/retroarch-joypad-autoconfig/

As I said in the top post:

This issue does not occur with the Appimage version.

Should I file a bug report to the Appimage repo?

gouchi commented 1 month ago

This issue does not occur with the Appimage version.

Should I file a bug report to the Appimage repo?

It should give the same result using SDL2 driver for the Flatpak and AppImage.

So you might open an issue but we don't have AppImage repo just Flatpak and snap.

Thank you.

davidhedlund commented 1 month ago

There is an issue with udev on Flatpak so they switch to SDL2.

It seems it is the name given by the SDL2 Game controller community database. You can check it using SDL2 Gamepad Mapper.

So I am not sure we can change it.

Thank you very much for the database reference.

davidhedlund commented 1 month ago

So you might open an issue but we don't have AppImage repo just Flatpak and snap.

Are you aware of this?:

davidhedlund commented 1 month ago
gouchi commented 1 month ago

Are you aware of this?: https://github.com/hizzlekizzle/RetroArch-AppImage/issues

Yes I know it. But we are using Gitlab CI/CD to build the AppImage package.

I meant we don't have dedicated repo for the AppImage package so you might open an issue in this repo.

Thank you.

davidhedlund commented 1 month ago

Are you aware of this?: https://github.com/hizzlekizzle/RetroArch-AppImage/issues

Yes I know it. But we are using Gitlab CI/CD to build the AppImage package.

I meant we don't have dedicated repo for the AppImage package so you might open an issue in this repo.

Thank you.

Thanks back.