From 338438ecef6d48d5df6d465863fdc1272cf4f508 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Fri, 18 Mar 2022 10:23:29 +0100 Subject: [PATCH] winebus.sys: Assume SDL device effects are running by default. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If we cannot read their status with SDL_HapticGetEffectStatus. Signed-off-by: RĂ©mi Bernon Signed-off-by: Alexandre Julliard --- dlls/winebus.sys/bus_sdl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/winebus.sys/bus_sdl.c b/dlls/winebus.sys/bus_sdl.c index 07fdd9d3fa2..a1e7942fe59 100644 --- a/dlls/winebus.sys/bus_sdl.c +++ b/dlls/winebus.sys/bus_sdl.c @@ -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));