JoystickAImpl_Unacquire should return DI_NOEFFECT if the device is not
in an acquired state.
This commit is contained in:
parent
e40da9f17c
commit
ab4e40cf0f
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue