Commit ab4e40cf authored by Hannu Valtonen's avatar Hannu Valtonen Committed by Alexandre Julliard

JoystickAImpl_Unacquire should return DI_NOEFFECT if the device is not

in an acquired state.
parent e40da9f1
...@@ -306,8 +306,10 @@ static HRESULT WINAPI JoystickAImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface) ...@@ -306,8 +306,10 @@ static HRESULT WINAPI JoystickAImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface)
if (This->joyfd!=-1) { if (This->joyfd!=-1) {
close(This->joyfd); close(This->joyfd);
This->joyfd = -1; This->joyfd = -1;
}
return DI_OK; return DI_OK;
}
else
return DI_NOEFFECT;
} }
#define map_axis(val) ((val+32768)*(This->lMax-This->lMin)/65536+This->lMin) #define map_axis(val) ((val+32768)*(This->lMax-This->lMin)/65536+This->lMin)
......
...@@ -432,8 +432,10 @@ static HRESULT WINAPI JoystickAImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface) ...@@ -432,8 +432,10 @@ static HRESULT WINAPI JoystickAImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface)
if (This->joyfd!=-1) { if (This->joyfd!=-1) {
close(This->joyfd); close(This->joyfd);
This->joyfd = -1; This->joyfd = -1;
}
return DI_OK; return DI_OK;
}
else
return DI_NOEFFECT;
} }
/* /*
......
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