Commit 338438ec authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winebus.sys: Assume SDL device effects are running by default.

If we cannot read their status with SDL_HapticGetEffectStatus. Signed-off-by: 's avatarRémi Bernon <rbernon@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 62d40eb0
......@@ -752,12 +752,13 @@ static void check_device_effects_state(struct sdl_device *impl)
unsigned int i, ret;
if (!impl->sdl_haptic) return;
if (!(impl->effect_support & SDL_HAPTIC_STATUS)) return;
if (!(impl->effect_support & EFFECT_SUPPORT_PHYSICAL)) return;
for (i = 0; i < ARRAY_SIZE(impl->effect_ids); ++i)
{
if (impl->effect_ids[i] == -1) continue;
ret = pSDL_HapticGetEffectStatus(impl->sdl_haptic, impl->effect_ids[i]);
if (!(impl->effect_support & SDL_HAPTIC_STATUS)) ret = 1;
else ret = pSDL_HapticGetEffectStatus(impl->sdl_haptic, impl->effect_ids[i]);
if (impl->effect_state[i] == ret) continue;
impl->effect_state[i] = ret;
hid_device_set_effect_state(iface, i, effect_flags | (ret == 1 ? EFFECT_STATE_EFFECT_PLAYING : 0));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment