[PATCH 1/9] dinput: Move acquired flag to the base device class.
wine-devel at kievinfo.com
Fri Dec 1 10:52:16 CST 2006
Peter Oberndorfer wrote:
> On Friday 01 December 2006 07:23, Vitaliy Margolen wrote:
>> dlls/dinput/device.c | 28 ++++++++++++++++++++++++++++
>> dlls/dinput/device_private.h | 3 +++
>> dlls/dinput/joystick_linux.c | 23 ++++++++---------------
>> dlls/dinput/keyboard.c | 36 ++++++++++++++++--------------------
>> dlls/dinput/mouse.c | 23 ++++++++---------------
>> 5 files changed, 63 insertions(+), 50 deletions(-)
> some questions/notices about this patch:
Thank you for spending time and looking over my craft :)
> Previously when the device was not acquired inside JoystickAImpl_Unacquire DIERR_NOTACQUIRED was returned.
> now you call IDirectInputDevice2AImpl_Unacquire, which returns DI_NOEFFECT when not acquired.
That is correct. I should have added small tests to show that it should
work that way. I will add it next time around.
> but DI_NOEFFECT does not have high bit set so it won't trigger the FAILED macro.
Oops I didn't check that one. More reasons for some tests.
> Do you know if the Acquire/Unacquire functions return value the same for all device types?
Tests and msdn indicate that return values are identical for all
> In JoystickAImpl_Acquire you don't use your new IDirectInputDevice2AImpl_Acquire function but set This->base.acquired = 1;
> Is there a reason for this?
> In SysKeyboardAImpl_Unacquire you seem to call IDirectInputDevice2AImpl_Acquire?
Because there are few other things that's being checked before joystick
can be acquired. Mouse and keyboard just acquire the device without any
There are lots of other inconsistencies all over dinput. This is one of
the reasons I'm trying to unify all the common code in one place.
More information about the wine-devel