[dinput-2/6] register the amount of povs in the caps
Christoph Frick
frick at sc-networks.de
Mon Jul 3 04:27:42 CDT 2006
License: LGPL
ChangeLog:
2006-07-02 Christoph Frick <rid at zefix.tv>
set the amount of POVs in the caps
---
dlls/dinput/joystick_linuxinput.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c
index 8e493c3..9330a00 100644
--- a/dlls/dinput/joystick_linuxinput.c
+++ b/dlls/dinput/joystick_linuxinput.c
@@ -986,7 +986,7 @@ static HRESULT WINAPI JoystickAImpl_GetC
LPDIDEVCAPS lpDIDevCaps)
{
JoystickImpl *This = (JoystickImpl *)iface;
- int i,axes,buttons;
+ int i,axes,buttons,povs;
TRACE("%p->(%p)\n",iface,lpDIDevCaps);
@@ -1010,12 +1010,19 @@ static HRESULT WINAPI JoystickAImpl_GetC
for (i=0;i<ABS_MAX;i++) if (test_bit(This->joydev->absbits,i)) axes++;
buttons=0;
for (i=0;i<KEY_MAX;i++) if (test_bit(This->joydev->keybits,i)) buttons++;
+ povs=0;
+ for (i=0; i<4; i++) {
+ if (test_bit(This->joydev->absbits,ABS_HAT0X+(i<<1)) && test_bit(This->joydev->absbits,ABS_HAT0Y+(i<<1))) {
+ povs ++;
+ }
+ }
if (This->has_ff)
lpDIDevCaps->dwFlags |= DIDC_FORCEFEEDBACK;
lpDIDevCaps->dwAxes = axes;
lpDIDevCaps->dwButtons = buttons;
+ lpDIDevCaps->dwPOVs = povs;
return DI_OK;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 163 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060703/5880a1fd/attachment.pgp
More information about the wine-patches
mailing list