Skip to content

Commit

Permalink
dinput: Add workaround for GTA4 gamepad bug
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyProkhin committed Mar 31, 2020
1 parent 26aac31 commit 99e882a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dlls/dinput/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ static int KeyboardCallback( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM
}
new_diks = hook->flags & LLKHF_UP ? 0 : 0x80;

if ((hook->flags & LLKHF_INJECTED) && dik_code == DIK_F8) {
TRACE("Workaround for GTA 4 gamepad bug\n");
return ret;
}

/* returns now if key event already known */
if (new_diks == This->DInputKeyState[dik_code])
return ret;
Expand Down

0 comments on commit 99e882a

Please sign in to comment.