Fix controller detection on Windows 11 by disabling modern game controller API #471
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Chromium 117 and above uses Windows.Gaming.Input, which states
This is not useful, as users will have the game focused, not OBS.
Issue raised with Chromium: https://issues.chromium.org/issues/392661398
Original commit that introduced the change:
https://chromiumdash.appspot.com/commit/aeb76145fe766a359f2e2b7432c207cc135113b6
The mentioned flag is set to never expire, so should be available indefinitely.
Ideally, Microsoft should update this API to match the previous (XInput) behaviour, or provide a flag to set the focus policy, which is provided by the IGameInput API. Until then, we will disable WGI.
Motivation and Context
Ultimately, this is a regression. Multiple users have reported being unable to use Gamepad Viewer when using Windows 11 and OBS 31. This is a very common use case of displaying controller inputs on stream.
How Has This Been Tested?
Types of changes
Checklist: