One option, under Windows, as far as I could find, is to implement a force feedback device driver. You must implement a registry in the system a dll with a COM object that implements
IDirectInputEffectDriverand register the CLSID in:
HKEY_LOCAL_MACHINE System CurrentControlSet Control MediaProperties PrivateProperties Joystick OEM
Then you would set the forced return with your device in the game.
See Forced Return Device Driver Interface.
I find the documentation missing and I have not found any sample code.