dinput: Ignore events from extra joystick buttons.

This commit is contained in:
Vitaliy Margolen 2008-05-06 10:28:12 -06:00 committed by Alexandre Julliard
parent bdbc2783a1
commit 9227e25660
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}