Vitaliy Margolen : dinput: Don't use dead-zone from the device.
Alexandre Julliard
julliard at winehq.org
Mon Apr 14 07:14:10 CDT 2008
Module: wine
Branch: master
Commit: 3ba6f864f434f4e29ad189588d3981e453254303
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3ba6f864f434f4e29ad189588d3981e453254303
Author: Vitaliy Margolen <wine-patches at kievinfo.com>
Date: Sat Apr 12 11:33:28 2008 -0600
dinput: Don't use dead-zone from the device.
---
dlls/dinput/joystick_linuxinput.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c
index f318392..50befd9 100644
--- a/dlls/dinput/joystick_linuxinput.c
+++ b/dlls/dinput/joystick_linuxinput.c
@@ -423,7 +423,7 @@ static JoystickImpl *alloc_device(REFGUID rguid, const void *jvt, IDirectInputIm
int i, idx = 0;
char buffer[MAX_PATH+16];
HKEY hkey, appkey;
- LONG def_deadzone = -1;
+ LONG def_deadzone = 0;
newDevice = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(JoystickImpl));
if (!newDevice) return NULL;
@@ -471,9 +471,7 @@ static JoystickImpl *alloc_device(REFGUID rguid, const void *jvt, IDirectInputIm
newDevice->props[idx].lMin = 0;
newDevice->props[idx].lMax = 0xffff;
newDevice->props[idx].lSaturation = 0;
- newDevice->props[idx].lDeadZone = def_deadzone >= 0 ? def_deadzone :
- MulDiv(newDevice->joydev->axes[i].flat, 0xffff,
- newDevice->props[idx].lDevMax - newDevice->props[idx].lDevMin);
+ newDevice->props[idx].lDeadZone = def_deadzone;
df->rgodf[idx++].dwType = DIDFT_MAKEINSTANCE(newDevice->numAxes++) | DIDFT_ABSAXIS;
}
More information about the wine-cvs
mailing list