https://bugs.winehq.org/show_bug.cgi?id=46142
--- Comment #15 from Ivan Kalvachev iive@yahoo.com --- (In reply to Zebediah Figura from comment #14)
(In reply to Ivan Kalvachev from comment #13)
Thinking about that, it makes sense, as historically XInputGetState() is likely implemented first, so the *Ex() extended function would call the old one. But in wine the opposite happens.
Well, no, not really; Ex functions have more features than their original counterparts, so you can't implement them like that. (E.g. we would lose the information about whether XINPUT_GAMEPAD_GUIDE is set.)
Why would you lose information? You just call the old function first, it fills the old fields, then you add the new information.
Also XInputGetStateEx() seems to be undocumented function and it seems to take pointer to a structure that is containing additional DWORD. That's why you need a new function, to use bigger structure than the old one.
Anyway, moving the code to internal function is fine solution that would work in all cases.
More likely both call down to a common function. I've sent a patch to that effect.
Your patch does not add HOTPATCH to all the functions. That should be done too.