JoystickAImpl_Unacquire should return DI_NOEFFECT if the device is not

in an acquired state.
This commit is contained in:
Hannu Valtonen 2003-10-30 22:48:04 +00:00 committed by Alexandre Julliard
parent e40da9f17c
commit ab4e40cf0f
2 changed files with 6 additions and 2 deletions

View File

@ -306,8 +306,10 @@ static HRESULT WINAPI JoystickAImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface)
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)

View File

@ -432,8 +432,10 @@ static HRESULT WINAPI JoystickAImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface)
if (This->joyfd!=-1) {
close(This->joyfd);
This->joyfd = -1;
return DI_OK;
}
return DI_OK;
else
return DI_NOEFFECT;
}
/*