Don't bother calling SDL_SYS_HapticEffectType() at all for XInput devices.

main
Ryan C. Gordon 2013-10-20 15:45:48 -04:00
parent 5e74299a83
commit 54dce3f53a
1 changed files with 6 additions and 3 deletions

View File

@ -1202,10 +1202,13 @@ SDL_SYS_HapticNewEffect(SDL_Haptic * haptic, struct haptic_effect *effect,
SDL_HapticEffect * base)
{
HRESULT ret;
REFGUID type = SDL_SYS_HapticEffectType(base);
REFGUID type = NULL;
if ((type == NULL) && (!haptic->hwdata->bXInputHaptic)) {
goto err_hweffect;
if (!haptic->hwdata->bXInputHaptic) {
type = SDL_SYS_HapticEffectType(base);
if (type == NULL) {
goto err_hweffect;
}
}
/* Alloc the effect. */