[PATCH v4 2/2] dinput: Fix DInput8 keyboard behavior for injected events with scancode=0.

Rémi Bernon rbernon at codeweavers.com
Fri Apr 17 14:28:35 CDT 2020


On 4/17/20 9:14 PM, Brendan Shanks wrote:
> Hmm interesting, this may be a different issue though. I’ve only seen this on GTA 4, not sure if there’s something similar in GTA 5.
> GTAIV does have code to install a LL keyboard hook, but on Windows 10 and Wine it doesn’t seem to actually run.
> 
> A minute or two after the game launches, it starts calling SendInput() constantly with VK_F8, scan=0 and other args=0.
> It’s bizarre behavior, my best theory is that F8 was a common key used by cheats to bring up their menu, so constantly sending it would make cheats go crazy and the game unplayable. But by exploiting this corner case of DirectInput8 ignoring the VK (certainly when scancode=0), the game itself isn’t affected.
> 
> Brendan
> 

Ah, my bad, I read GTAV instead of GTAIV.  In any case even if the issue 
is different, the DInput8 is still implemented over RawInput, which 
explains why it doesn't report key press when messages are injected.

I believe there are already some dinput and dinput8 tests to validate 
that fact, but the implementation still waits in staging (and I'm not 
sue if extracting only the dinput code would work fine).
-- 
Rémi Bernon <rbernon at codeweavers.com>



More information about the wine-devel mailing list