Commit 81fc89fa authored by Vitaliy Margolen's avatar Vitaliy Margolen Committed by Alexandre Julliard

dinput: Check acquired flag instead of fd.

parent 3cd13628
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment