https://bugs.winehq.org/show_bug.cgi?id=47070
--- Comment #20 from Cameron Moore moore.cameron1111@gmail.com --- Pretty confident I found the actual problem this time. Not sure exactly why it is happening at the moment but I am continuing to look into it. Posting this in case any other people more experienced in Wine development can help pinpoint why this might be happening.
Anyway, what seems to be happening is that GetFocus() is called every frame of the game before XInputGetState() can be called. GetFocus() returns the window handle of the that has keyboard focus. However, what happens is that GetFocus() returns NULL after about 10 calls where it correctly returns a window handle. XInputGetState() is called after checking for GetFocus() as long as it is not NULL + the one call after it returns NULL. Therefore, it seems to be assigning keyboard focus to a different thread than is needed.
I'm guessing that it is assigning keyboard focus to one of the other threads created after such as the "AsyncOpManager" or "EAAudioCore DAC" but have not checked yet.