mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 10:41:12 +00:00
dinput: When handling axes, ignore the ABS_HAT.* as they are handled as POV.
This commit is contained in:
parent
14e9ee55ba
commit
03260f738b
1 changed files with 21 additions and 2 deletions
|
@ -994,7 +994,19 @@ static HRESULT WINAPI JoystickAImpl_GetCapabilities(
|
|||
lpDIDevCaps->dwDevType = DIDEVTYPE_JOYSTICK | (DIDEVTYPEJOYSTICK_TRADITIONAL << 8);
|
||||
|
||||
axes=0;
|
||||
for (i=0;i<ABS_MAX;i++) if (test_bit(This->joydev->absbits,i)) axes++;
|
||||
for (i=0;i<ABS_MAX;i++) {
|
||||
if (!test_bit(This->joydev->absbits,i)) continue;
|
||||
switch (i) {
|
||||
case ABS_HAT0X: case ABS_HAT0Y:
|
||||
case ABS_HAT1X: case ABS_HAT1Y:
|
||||
case ABS_HAT2X: case ABS_HAT2Y:
|
||||
case ABS_HAT3X: case ABS_HAT3Y:
|
||||
/* will be handled as POV - see below */
|
||||
break;
|
||||
default:
|
||||
axes++;
|
||||
}
|
||||
}
|
||||
buttons=0;
|
||||
for (i=0;i<KEY_MAX;i++) if (test_bit(This->joydev->keybits,i)) buttons++;
|
||||
povs=0;
|
||||
|
@ -1090,8 +1102,15 @@ static HRESULT WINAPI JoystickAImpl_EnumObjects(
|
|||
ddoi.guidType = GUID_Slider;
|
||||
ddoi.dwOfs = DIJOFS_SLIDER(1);
|
||||
break;
|
||||
case ABS_HAT0X: case ABS_HAT0Y:
|
||||
case ABS_HAT1X: case ABS_HAT1Y:
|
||||
case ABS_HAT2X: case ABS_HAT2Y:
|
||||
case ABS_HAT3X: case ABS_HAT3Y:
|
||||
/* will be handled as POV - see below */
|
||||
continue;
|
||||
default:
|
||||
FIXME("unhandled abs axis %d, ignoring!\n",i);
|
||||
FIXME("unhandled abs axis 0x%02x, ignoring!\n",i);
|
||||
continue;
|
||||
}
|
||||
ddoi.dwType = DIDFT_MAKEINSTANCE(i << WINE_JOYSTICK_AXIS_BASE) | DIDFT_ABSAXIS;
|
||||
/* Linux event force feedback supports only (and always) x and y axes */
|
||||
|
|
Loading…
Reference in a new issue