From cc373223b0803d19bc3b2bb315000e1e31274b86 Mon Sep 17 00:00:00 2001 From: Bruno Jesus <00cpxxx@gmail.com> Date: Thu, 26 Jan 2017 17:07:01 -0200 Subject: [PATCH] dinput: Fix GetEffectStatus for Linux when effect was not downloaded. Signed-off-by: Bruno Jesus <00cpxxx@gmail.com> Signed-off-by: Alexandre Julliard --- dlls/dinput/effect_linuxinput.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/dinput/effect_linuxinput.c b/dlls/dinput/effect_linuxinput.c index 0fd16ed66da..7477bc757da 100644 --- a/dlls/dinput/effect_linuxinput.c +++ b/dlls/dinput/effect_linuxinput.c @@ -234,11 +234,16 @@ static HRESULT WINAPI LinuxInputEffectImpl_GetEffectStatus( LPDIRECTINPUTEFFECT iface, LPDWORD pdwFlags) { - TRACE("(this=%p,%p)\n", iface, pdwFlags); + LinuxInputEffectImpl *This = impl_from_IDirectInputEffect(iface); + + TRACE("(this=%p,%p)\n", This, pdwFlags); if (!pdwFlags) return E_POINTER; + if (This->effect.id == -1) + return DIERR_NOTDOWNLOADED; + /* linux sends the effect status through an event. * that event is trapped by our parent joystick driver * and there is no clean way to pass it back to us. */ -- 2.11.4.GIT