Vitaliy Margolen : dinput: Ignore events from extra joystick buttons.
Alexandre Julliard
julliard at winehq.org
Wed May 7 13:28:11 CDT 2008
Module: wine
Branch: master
Commit: 9227e25660c80524ae9688a77cc7b93f97806d4c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9227e25660c80524ae9688a77cc7b93f97806d4c
Author: Vitaliy Margolen <wine-patches at kievinfo.com>
Date: Tue May 6 10:28:12 2008 -0600
dinput: Ignore events from extra joystick buttons.
---
dlls/dinput/joystick_linux.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c
index a151390..9dead0a 100644
--- a/dlls/dinput/joystick_linux.c
+++ b/dlls/dinput/joystick_linux.c
@@ -698,6 +698,8 @@ static void joy_polldev(JoystickImpl *This) {
jse.type,jse.number,jse.value);
if (jse.type & JS_EVENT_BUTTON)
{
+ if (jse.number >= This->devcaps.dwButtons) return;
+
inst_id = DIDFT_MAKEINSTANCE(jse.number) | DIDFT_PSHBUTTON;
This->js.rgbButtons[jse.number] = value = jse.value ? 0x80 : 0x00;
}
More information about the wine-cvs
mailing list