stride3d / stride

Stride Game Engine (formerly Xenko)
https://stride3d.net
MIT License
6.48k stars 939 forks source link

Setting the .net SDK of a project to "net6.0" results in inconsistent controller behavior #1791

Open SeleDreams opened 1 year ago

SeleDreams commented 1 year ago

Release Type: Official release

Version: 4.1.0.1898

Platform(s): Windows 11

Describe the bug When the target sdk of the csproj of a project is set to net6.0, its controller detection will be inconsistent with net6.0-windows This caused a lot of trouble when porting an old project. Basically, if a game is compiled with net6.0, it will detect some controllers (XInput controllers) as GameControllers instead of gamepads and as such, those won't be detected by gamepad functions and will not work with the virtual key binding API. However if a game is compiled with net6.0-windows specifically, then the input system will behave as intended.

To Reproduce Steps to reproduce the behavior:

  1. Create a project with stride
  2. Define the net version as "net6.0" for both the game library and game binary
  3. Xbox One and Xbox Series X controllers are detected as GameController and will not work with the virtual input system

Expected behavior net6.0 should behave the same as net6.0-windows or at least, an error should appear if net6.0-windows specifically is expected on windows for the engine to behave as intended

KanterVault commented 10 months ago

It would be great if GameController containing the word 'xbox' or 'gamepad' in its name were simply sent to the Input.GamePads list. That would immediately solve all the problems. image