Module: wine Branch: master Commit: 81fc89fa6d8053fbf3a0f1bd5cf16d21ffe9a7fd URL: http://source.winehq.org/git/wine.git/?a=commit;h=81fc89fa6d8053fbf3a0f1bd5c...
Author: Vitaliy Margolen wine-patches@kievinfo.com Date: Sun Aug 19 22:26:31 2007 -0600
dinput: Check acquired flag instead of fd.
---
dlls/dinput/joystick_linuxinput.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c index f5f7e5d..c025219 100644 --- a/dlls/dinput/joystick_linuxinput.c +++ b/dlls/dinput/joystick_linuxinput.c @@ -737,7 +737,8 @@ static HRESULT WINAPI JoystickAImpl_GetDeviceState(
TRACE("(this=%p,0x%08x,%p)\n", This, len, ptr);
- if (This->joyfd==-1) { + if (!This->base.acquired) + { WARN("not acquired\n"); return DIERR_NOTACQUIRED; } @@ -863,13 +864,14 @@ static HRESULT WINAPI JoystickAImpl_GetCapabilities( return DI_OK; }
-static HRESULT WINAPI JoystickAImpl_Poll(LPDIRECTINPUTDEVICE8A iface) { +static HRESULT WINAPI JoystickAImpl_Poll(LPDIRECTINPUTDEVICE8A iface) +{ JoystickImpl *This = (JoystickImpl *)iface; + TRACE("(%p)\n",This);
- if (This->joyfd==-1) { - return DIERR_NOTACQUIRED; - } + if (!This->base.acquired) + return DIERR_NOTACQUIRED;
joy_polldev(This); return DI_OK;