Christoph Frick : dinput: Set the amount of POVs in the caps.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Jul 7 11:09:51 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: 14e9ee55ba259830ab91d28364881f31a69917f2
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=14e9ee55ba259830ab91d28364881f31a69917f2
Author: Christoph Frick <frick at sc-networks.de>
Date: Thu Jul 6 13:12:43 2006 +0200
dinput: 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 3b4a4eb..e89a4b7 100644
--- a/dlls/dinput/joystick_linuxinput.c
+++ b/dlls/dinput/joystick_linuxinput.c
@@ -973,7 +973,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);
@@ -997,12 +997,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;
}
More information about the wine-cvs
mailing list