mirror of https://github.com/encounter/SDL.git
Moved a SDL_SetError() call elsewhere to avoid triggering it needlessly.
Otherwise, the XInput path would always trigger it in a harmless manner.
This commit is contained in:
parent
28aa076c8b
commit
965a0da901
|
@ -1190,7 +1190,6 @@ SDL_SYS_HapticEffectType(SDL_HapticEffect * effect)
|
||||||
return &GUID_CustomForce;
|
return &GUID_CustomForce;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
SDL_SetError("Haptic: Unknown effect type.");
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1207,6 +1206,7 @@ SDL_SYS_HapticNewEffect(SDL_Haptic * haptic, struct haptic_effect *effect,
|
||||||
REFGUID type = SDL_SYS_HapticEffectType(base);
|
REFGUID type = SDL_SYS_HapticEffectType(base);
|
||||||
|
|
||||||
if ((type == NULL) && (!haptic->hwdata->bXInputHaptic)) {
|
if ((type == NULL) && (!haptic->hwdata->bXInputHaptic)) {
|
||||||
|
SDL_SetError("Haptic: Unknown effect type.");
|
||||||
goto err_hweffect;
|
goto err_hweffect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue