From f57ef6ff973d94ac2405a10b9b0c55534b6b909a Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Tue, 19 Sep 2017 10:31:22 -0400 Subject: [PATCH] WinRT: noted UWP's inability to work with some game controllers --- docs/README-winrt.md | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/docs/README-winrt.md b/docs/README-winrt.md index 8c3df2019..8de908b02 100644 --- a/docs/README-winrt.md +++ b/docs/README-winrt.md @@ -75,7 +75,10 @@ Here is a rough list of what works, and what doens't: anything outside of the app is not supported. * system path retrieval via SDL's filesystem APIs * game controllers. Support is provided via the SDL_Joystick and - SDL_GameController APIs, and is backed by Microsoft's XInput API. + SDL_GameController APIs, and is backed by Microsoft's XInput API. Please + note, however, that Windows limits game-controller support in UWP apps to, + "Xbox compatible controllers" (many controllers that work in Win32 apps, + do not work in UWP, due to restrictions in UWP itself.) * multi-touch input * app events. SDL_APP_WILLENTER* and SDL_APP_DIDENTER* events get sent out as appropriate. @@ -103,8 +106,10 @@ Here is a rough list of what works, and what doens't: SDL_CreateSystemCursor() (unsupported on Windows Phone) * SDL_WarpMouseInWindow() or SDL_WarpMouseGlobal(). This are not currently supported by WinRT itself. - * joysticks and game controllers that aren't supported by Microsoft's XInput - API. + * joysticks and game controllers that either are not supported by + Microsoft's XInput API, or are not supported within UWP apps (many + controllers that work in Win32, do not work in UWP, due to restrictions in + UWP itself). * turning off VSync when rendering on Windows Phone. Attempts to turn VSync off on Windows Phone result either in Direct3D not drawing anything, or it forcing VSync back on. As such, SDL_RENDERER_PRESENTVSYNC will always get @@ -520,3 +525,16 @@ making sure these items are checked as-appropriate, install them. Once you install these components, try re-launching Visual Studio, and re-opening the SDL project file. If you still get the error dialog, try using the Output window, again, seeing what Visual Studio says about it. + +#### Game controllers / joysticks aren't working! + +Windows only permits certain game controllers and joysticks to work within +WinRT / UWP apps. Even if a game controller or joystick works in a Win32 +app, that device is not guaranteed to work inside a WinRT / UWP app. + +According to Microsoft, "Xbox compatible controllers" should work inside +UWP apps, potentially with more working in the future. This includes, but +may not be limited to, Microsoft-made Xbox controllers and USB adapters. +(Source: https://social.msdn.microsoft.com/Forums/en-US/9064838b-e8c3-4c18-8a83-19bf0dfe150d/xinput-fails-to-detect-game-controllers?forum=wpdevelop) + +