Commit 9227e256 authored by Vitaliy Margolen's avatar Vitaliy Margolen Committed by Alexandre Julliard

dinput: Ignore events from extra joystick buttons.

parent bdbc2783
...@@ -698,6 +698,8 @@ static void joy_polldev(JoystickImpl *This) { ...@@ -698,6 +698,8 @@ static void joy_polldev(JoystickImpl *This) {
jse.type,jse.number,jse.value); jse.type,jse.number,jse.value);
if (jse.type & JS_EVENT_BUTTON) if (jse.type & JS_EVENT_BUTTON)
{ {
if (jse.number >= This->devcaps.dwButtons) return;
inst_id = DIDFT_MAKEINSTANCE(jse.number) | DIDFT_PSHBUTTON; inst_id = DIDFT_MAKEINSTANCE(jse.number) | DIDFT_PSHBUTTON;
This->js.rgbButtons[jse.number] = value = jse.value ? 0x80 : 0x00; This->js.rgbButtons[jse.number] = value = jse.value ? 0x80 : 0x00;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment