I want to build a "force feedback chair" for Need for Speed: Payback, so I thought about hooking the function responsible for the controller vibration and sending the motor speed parameter to a motor over Serial (to an arduino). I successfully hooked the XInputSetState function (responsible for Controller Vibration) and sent the parameters over usb, and everything worked fine. The problem is, I want to play the game with a Wheel (Logitech g29). The "XInputSetState" function still gets called, but the motor speed parameter is always 0 (makes sense, if you have two controllers connected to your pc, only the one you're driving with vibrates not the other one). My Wheel also has no Vibration feedback (so no function that i can hook there).
So my thought was, that if you for example drive against a wall, the game checks if a Controller is connected, and if it's the case, calls the XInputSetState function with the correct motor speed parameter (so the Controller vibrates).
For now I tried setting a breakpoint on XInputSetState and moving up the Callstack, to see what function still gets called with the correct motor speed parameter (even if no Controller is present), but my knowledge with reveersing is still very limited so no luck there.
So how would you go about looking for such a function? Any tips and hints are welcome.