mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2025-01-17 14:47:19 +01:00
Don't bother calling SDL_SYS_HapticEffectType() at all for XInput devices.
This commit is contained in:
parent
5e74299a83
commit
54dce3f53a
@ -1202,10 +1202,13 @@ SDL_SYS_HapticNewEffect(SDL_Haptic * haptic, struct haptic_effect *effect,
|
|||||||
SDL_HapticEffect * base)
|
SDL_HapticEffect * base)
|
||||||
{
|
{
|
||||||
HRESULT ret;
|
HRESULT ret;
|
||||||
REFGUID type = SDL_SYS_HapticEffectType(base);
|
REFGUID type = NULL;
|
||||||
|
|
||||||
if ((type == NULL) && (!haptic->hwdata->bXInputHaptic)) {
|
if (!haptic->hwdata->bXInputHaptic) {
|
||||||
goto err_hweffect;
|
type = SDL_SYS_HapticEffectType(base);
|
||||||
|
if (type == NULL) {
|
||||||
|
goto err_hweffect;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Alloc the effect. */
|
/* Alloc the effect. */
|
||||||
|
Loading…
Reference in New Issue
Block a user