DirectInput mouse button bug fixed (Oni now works)

Neil Olver olver at math.mcgill.ca
Thu Dec 23 02:40:45 CST 2004


I've fixed a bug in the DirectInput code which prevented the mouse
buttons from working under Oni. It may effect other games as well, I
don't know.

Essentially, the flag for a mouse button down in the structure returned
by GetDeviceState should be 0x80 (only the high bit set), not 0xff. Most
games I imagine just check if the flag is zero; Oni compares it to 0x80.

MSDN appears to confirm this is the correct behaviour: 
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/directx/input/ref/structs/dimousestate.asp

I haven't been able to test this with much else - mouse buttons still
work in UFO Aftermath though.

-Neil 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-patch
Size: 1771 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20041223/26240d40/patch.bin


More information about the wine-patches mailing list