Bruno Jesus : dinput: Fix GetEffectStatus for Linux when effect was not downloaded.
Module: wine Branch: master Commit: cc373223b0803d19bc3b2bb315000e1e31274b86 URL: http://source.winehq.org/git/wine.git/?a=commit;h=cc373223b0803d19bc3b2bb315... Author: Bruno Jesus <00cpxxx(a)gmail.com> Date: Thu Jan 26 17:07:01 2017 -0200 dinput: Fix GetEffectStatus for Linux when effect was not downloaded. Signed-off-by: Bruno Jesus <00cpxxx(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- 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 0fd16ed..7477bc7 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. */
participants (1)
-
Alexandre Julliard