Here are a few more fixes for dinput unacquire handling. According to MSDN DirectInputDevice Unacquire is allowed even for devices which haven't been acquired yet. These patches use the current (messy) scheme of things.
Changelog: - JoystickAImpl_Unacquire should return DI_NOEFFECT if the device is not in an acquired state.
- Hannu Valtonen Hannu.Valtonen@hut.fi
--- linux.c 2003-10-29 14:07:53.000000000 +0200 +++ wine/dlls/dinput/joystick/linux.c 2003-10-29 13:59:18.000000000 +0200 @@ -306,8 +306,10 @@ if (This->joyfd!=-1) { close(This->joyfd); 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)
--- linuxinput.c 2003-10-29 14:05:06.000000000 +0200 +++ wine/dlls/dinput/joystick/linuxinput.c 2003-10-29 14:09:18.000000000 +0200 @@ -432,8 +432,10 @@ if (This->joyfd!=-1) { close(This->joyfd); This->joyfd = -1; + return DI_OK; } - return DI_OK; + else + return DI_NOEFFECT; } /*