Added the hint SDL_HINT_JOYSTICK_WGI to control whether to use Windows.Gaming.Input for controllers

This commit is contained in:
Sam Lantinga
2023-07-08 09:32:24 -07:00
parent a4f3905bb6
commit 3a654b4b1c
4 changed files with 23 additions and 5 deletions

View File

@@ -593,6 +593,10 @@ static int WGI_JoystickInit(void)
{
HRESULT hr;
if (!SDL_GetHintBoolean(SDL_HINT_JOYSTICK_WGI, SDL_TRUE)) {
return 0;
}
if (FAILED(WIN_RoInitialize())) {
return SDL_SetError("RoInitialize() failed");
}