From ba1a7ba62a55d2b7e205256fbaba5494c11ea25e Mon Sep 17 00:00:00 2001 From: Vitaliy Margolen Date: Sat, 5 Jul 2008 22:25:37 -0600 Subject: [PATCH] dinput: Set force feedback actuator flag for X and Y axes. Programs looking for this flag to verify if FF is present. And on which axes. --- dlls/dinput/joystick_linuxinput.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c index 0ef90a16596..aad25a47d60 100644 --- a/dlls/dinput/joystick_linuxinput.c +++ b/dlls/dinput/joystick_linuxinput.c @@ -472,6 +472,10 @@ static JoystickImpl *alloc_device(REFGUID rguid, const void *jvt, IDirectInputIm newDevice->props[idx].lSaturation = 0; newDevice->props[idx].lDeadZone = def_deadzone; + /* Linux supports force-feedback on X & Y axes only */ + if (newDevice->joydev->has_ff && (i == 0 || i == 1)) + df->rgodf[idx].dwFlags |= DIDOI_FFACTUATOR; + df->rgodf[idx++].dwType = DIDFT_MAKEINSTANCE(newDevice->numAxes++) | DIDFT_ABSAXIS; } -- 2.11.4.GIT