Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows.Gaming.Input only detect devices as RawGameControllers #9169

Closed
LudoTexx opened this issue Dec 17, 2023 · 4 comments
Closed

Windows.Gaming.Input only detect devices as RawGameControllers #9169

LudoTexx opened this issue Dec 17, 2023 · 4 comments
Labels
needs-author-feedback Asked author to supply more information. no-recent-activity question

Comments

@LudoTexx
Copy link

LudoTexx commented Dec 17, 2023

Describe the bug

When try to get Joystick or racing wheels with Windows.Gaming.Input all the devices are only recognized at RawGameControllers.

Joystick = Virpil controls
Racing wheels = Fanatec

Steps to reproduce the bug

using Windows.Gaming.Input;

var tmp = Windows.Gaming.Input.RacingWheel.RacingWheels; // EMPTY
var tmp2 = Windows.Gaming.Input.FlightStick.FlightSticks; // EMPTY
var tmp3 = Windows.Gaming.Input.Gamepad.Gamepads; // EMPTY
var tmp4 = Windows.Gaming.Input.ArcadeStick.ArcadeSticks; // EMPTY
var tmp5 = Windows.Gaming.Input.RawGameController.RawGameControllers; // Found all my joysticks and racing wheel

Expected behavior

Founding my joystick in Windows.Gaming.Input.FlightStick.FlightSticks;
Founding my racing wheel in Windows.Gaming.Input.RacingWheel.RacingWheels;

Screenshots

image

NuGet package version

None

Windows version

Windows 11 (22H2): Build 22621

Additional context

No response

@LudoTexx LudoTexx added the bug Something isn't working label Dec 17, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Dec 17, 2023
@DarranRowe
Copy link

I think reading the documentation is in order here.
The Windows documentation for all of these states similar things. If we take Gamepad.Gamepads as an example, then it states:

"This list is initially empty and will not list gamepads even if they are already connected. After a short period this will return a complete list of gamepads."

in the Remarks section. This essentially means that you should use Gamepad.Gamepads or the other similar properties as early as you can in your application to start populating the lists. This means that by the time you want to use them, the lists will be populated.

@LudoTexx
Copy link
Author

LudoTexx commented Dec 17, 2023

Thanks for your answer.

This is the same for RawGameController as you can see in MS documentation.
I call Windows.Gaming.Input.RawGameController.RawGameControllers in my MainWindows.cs, the list is empty as expected. And later in my program, the list is populated when I need to use it. The doc is clear on this.

But this not work for GamePad, Joystick and RacingWheel.

@DarranRowe
Copy link

DarranRowe commented Dec 17, 2023

Screenshot 2023-12-17 205008

It does work. This is with an XBox Series controller though. The documentation does state that runtime classes like GamePad needs an XBox One/XBox 360 certified controller. I wonder if that basically means that it needs an XInput driver.

--Edit--
Yes, I found a DirectInput controller and connected that. With both the XBox Series controller and the DirectInput controller (8BitDo set to DirectInput mode) connected at the same time, GamePad listed only one controller.
Interestingly, a Nintendo Switch Pro Controller is detected.

--Edit 2--
I also had relatively quick access to a HOTAS. This isn't detected in anything besides RawGameController. I'm sure this is a case of the runtime classes that you are having problems with only work with a certain subset of controllers. Complex controllers and DirectInput controllers just don't work with anything besides RawGameController.

@bpulliam bpulliam added needs-author-feedback Asked author to supply more information. question and removed bug Something isn't working needs-triage Issue needs to be triaged by the area owners labels Jan 22, 2024
Copy link
Contributor

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-author-feedback Asked author to supply more information. no-recent-activity question
Projects
None yet
Development

No branches or pull requests

3 participants