mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-05 01:16:26 +00:00
Don't use raw input while Remote Desktop is active
Raw input will not send game controller events while Remote Desktop is active, so dynamically switch between XInput and raw input when Remote Desktop state changes. Fixes https://github.com/libsdl-org/SDL/issues/7759
This commit is contained in:
@@ -104,7 +104,7 @@ extern SDL_bool SDL_DINPUT_JoystickPresent(Uint16 vendor, Uint16 product, Uint16
|
||||
|
||||
static SDL_bool SDL_IsXInputDevice(Uint16 vendor, Uint16 product)
|
||||
{
|
||||
#ifdef SDL_JOYSTICK_XINPUT
|
||||
#if defined(SDL_JOYSTICK_XINPUT) || defined(SDL_JOYSTICK_RAWINPUT)
|
||||
PRAWINPUTDEVICELIST raw_devices = NULL;
|
||||
UINT i, raw_device_count = 0;
|
||||
LONG vidpid = MAKELONG(vendor, product);
|
||||
@@ -202,7 +202,7 @@ static SDL_bool SDL_IsXInputDevice(Uint16 vendor, Uint16 product)
|
||||
}
|
||||
|
||||
SDL_free(raw_devices);
|
||||
#endif /* SDL_JOYSTICK_XINPUT */
|
||||
#endif /* SDL_JOYSTICK_XINPUT || SDL_JOYSTICK_RAWINPUT */
|
||||
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user