Project

General

Profile

Actions

Emulator Issues #13008

open

Duplicate controllers due to multiple controller API's

Added by Miksel12 over 2 years ago. Updated about 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

What's the problem? Describe what went wrong.

With the introduction of Windows Gaming Input and SDL, there are now 4 game controller API's for Windows. Besides cluttering the devices selection, it also completely negates the usefulness of the "All devices" option. When using a DS4 and selecting "All devices", I now get a SDL, WGI and Dinput input registered.

What steps will reproduce the problem?

Plug in a controller and look at the device selection drop down and try to use the "All devices option".

Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.

Since the introduction of SDL and WGI on Windows.

What are your PC specifications? (CPU, GPU, Operating System, more)

W11 and a Dualshock 4.

Is there anything else that can help developers narrow down the issue? (e.g. logs, screenshots,
configuration files, savefiles, savestates)

I adressed this problem in the WGInput pull request: https://github.com/dolphin-emu/dolphin/pull/7614#issuecomment-795639617
With Windows 7 and 8 support removed, I think it is time to phase out Dinput and Xinput in favour of WGinput and a modern keyboard and mouse API, and SDL for motion controls. I think making X/Dinput toggable in "Alternate Input Sources" just like DSU would make a good solution for now (or even for the long term) and new Dolphin installs can default on X/Dinput being disabled.

Actions #1

Updated by pokechu22 over 2 years ago

In my limited testing with a wireless Xbox One controller, it seemed like this only happened if the controller was connected before Dolphin started; if it was connected afterwards, you only got one controller (the SDL one).

Actions #2

Updated by Miksel12 over 2 years ago

pokechu22 wrote:

In my limited testing with a wireless Xbox One controller, it seemed like this only happened if the controller was connected before Dolphin started; if it was connected afterwards, you only got one controller (the SDL one).

Yeah, I have the same issue, I described it in this issue: https://bugs.dolphin-emu.org/issues/13009. Maybe that deserves a separate issue report.
Clicking on refresh does make them all show, at least for me.

Actions #3

Updated by Anonymous over 2 years ago

I think it is time to phase out Dinput and Xinput in favour of WGinput and a modern keyboard and mouse API

phasing out xinput completely seems fine as WGI is a direct successor to it. Is there any reason to keep xinput?

While I'd love to remove DInput, it seems it is still the defacto way to access keyboard/mouse. Do you have something more modern in mind? We could at least allow DInput to only be used with keyboard/mouse. I suspect removing DInput8 support would break very old devices (which only have very old drivers), although I'm not really sure.

Actions #4

Updated by Anonymous over 2 years ago

I guess CoreWindow-related stuff is "modern" keyboard/mouse: https://docs.microsoft.com/en-us/uwp/api/windows.ui.core.corewindow?view=winrt-22621
I'm not familiar with it so would need to tinker a bit to see if it's actually useful or just a winrt hellhole.

Actions #5

Updated by Miksel12 over 2 years ago

Microsoft states that WGInput replaces all legacy API's: https://docs.microsoft.com/en-us/gaming/gdk/_content/gc/input/overviews/input-overview#:~:text=GameInput%20is%20a%20functional,to%20custom%20device%20features. so I think all controllers currently using DInput should be able to use WGInput.

Actions #6

Updated by Anonymous over 2 years ago

The page you've linked is for GameInput, which is not Windows.Gaming.Input. GameInput is part of the Gaming Development Kit (GDK) which (afaict) is intended for AAA game developers. It does seem to be available for general use (https://github.com/microsoft/GDK ) but as of now dolphin takes no dependency on GDK.

Actions #7

Updated by Miksel12 over 2 years ago

Oh whoops, in that case I don't know either. I did test a Dualshock 3 some time ago and I believe it worked correctly.

Actions #8

Updated by Billiard26 about 2 years ago

Does Windows.Gaming.Input actually support all the old input devices that DirectInput was needed for? Do 20 year old force-feedback racing wheels work with WGI?

Actions

Also available in: Atom PDF