JosefNemec / Playnite

Video game library manager with support for wide range of 3rd party libraries and game emulation support, providing one unified interface for your games.
https://playnite.link
MIT License
9.41k stars 504 forks source link

Controller APIs keep getting re-enabled #3660

Closed Super1337Boy closed 9 months ago

Super1337Boy commented 10 months ago

Bug Description

I would like to keep support for some of the input APIs disabled in Playnite, but they keep getting re-enabled resulting in double inputs.

I have to admit I use a fairly convoluted setup, and that is probably the reason why not many people have reported this exact issue.

I regularly switch between an Xbox Controller and a Dualsense depending on the game (I prefer to use Dualsense in games that support adaptive triggers and haptic feedback natively), but I have DS4Windows set up to emulate the Dualsense as a 360 controller when not in games that have native support. (This also lets me control the desktop with either controller through JoyXoff). This means that to Playnite up to three different "controllers" keep getting disconnected and reconnected, and this seems to somehow bring about this issue.

My guess is that SDL automatically enables support for "new" controllers that are connected, and my hope is that this is something that can be changed so that support for different controller APIs are not automatically re-enabled after they have been disabled.

To Reproduce

One example of how this problem occurs:

  1. Use a Dualsense controller, have DS4Windows running, and set it up to disable emulation when a specific game that support Dualsense natively is running (i.e. Ratchet & Clank: Rift Apart).
  2. Disable Xbox 360 emulation in Playnite.
  3. Run the game.
  4. Close the game.
  5. Support for Xbox 360 emulation has been re-enabled.

Diagnostics ID

639dc1a0-5524-4f2d-9669-955a74403438

Screenshots

No response

JosefNemec commented 9 months ago

Disabled controllers are currently saved based on their USB device path that's provided by SDL. My only guess is that DS4Windows either makes different path each time controller is emulated or there's no device path available at all for these emulated devices. I don't own DS4 controller to test this.

Super1337Boy commented 9 months ago

That makes sense and probably explains the problem.

But is it really useful that individual controllers are saved as disabled? At least to me it seems more useful that each API is disabled by their respective checkboxes, regardless of which controller of the same type is connected.

That's also how I would expect it to work, based on what the settings UI looks like.

JosefNemec commented 9 months ago

But is it really useful that individual controllers are saved as disabled?

It is, one use case is where multiple controllers are attached to system but you want only one of them to able to control Playnite. This was brought up by users for example when playing games with kids where they don't want kids to be able to control Playnite.

At least to me it seems more useful that each API is disabled

We can't disable controllers by API, SDL wraps everything under one interface.

Super1337Boy commented 9 months ago

I understand. I guess there's not much that can be done about this issue then. I'll figure out another way to set things up.

Thanks so much for all the awesome work you put into Playnite. It really is an incredible piece of software!

JosefNemec commented 9 months ago

I could add some fallback to disable controller by name if there's no device path. I'll look into it for Playnite 11.