[PATCH 1/5] dinput: Fix GetEffectStatus for Linux when effect was not downloaded
Bruno Jesus
00cpxxx at gmail.com
Thu Jan 26 13:07:01 CST 2017
Tests will come after all patches due to a crash in Wine.
Signed-off-by: Bruno Jesus <00cpxxx at gmail.com>
---
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. */
--
2.9.3
More information about the wine-patches
mailing list