microsoft / DirectXTK

The DirectX Tool Kit (aka DirectXTK) is a collection of helper classes for writing DirectX 11.x code in C++
https://walbourn.github.io/directxtk/
MIT License
2.57k stars 510 forks source link

MAX_PLAYER_COUNT should be more than 8 for Windows 10 #161

Closed supersmo closed 5 years ago

supersmo commented 5 years ago

MAX_PLAYER_COUNT is 8 for XBox One but this is not true for Windows 10. I managed to access 9 XBox controllers (8 XBox360 + 1 XBoxOne controller) via Windows.Gaming.Input and got them all to rumble.

I'm guessing there is no limit since it's not documented on Windows.Gaming.Input. ref1 ref2 So whatever the MAX_PLAYER_COUNT is for Win10 is it should definitely be more than 8.

The DirectXTK API made me believe for years that the limitation of 8 controllers was carried over from XBox One to Windows 10 just like XBox 360 transferred the limit of 4 controllers for XInput.

If this gets changed the documentation here would need to be updated: https://github.com/Microsoft/DirectXTK/wiki/GamePad#universal-windows-app-platform-uwp

walbourn commented 5 years ago

The GamePad implementation even for Windows.Gaming.Input relies on the max player count and won't support more devices than 8 in any case. I'll make a note in the wiki docs.

supersmo commented 5 years ago

@walbourn To avoid confusion regarding ambiguity between DirectX.GamePad and Windows.Gaming.Input.Gamepad I suggest to include the namespace in the documentation.

Suggested change:
From:

Technically the Windows.Gaming.Input API can support more than 8 devices, but the GamePad implementation can only support up to MAX_PLAYER_COUNT.

To:

Technically the Windows.Gaming.Input API can support more than 8 devices, but the DirectX.GamePad implementation can only support up to MAX_PLAYER_COUNT.

walbourn commented 5 years ago

Updated wiki