DxWnd hot-patches it.
[DxWnd](https://sourceforge.net/p/dxwnd/home/Home/) is a remarkable tool for working with badly behaved old games. In [the DxWnd source code](https://sourceforge.net/projects/dxwnd/files/Sources/v2_06_01_src.rar/downlo...), see dll/dinput.cpp for the list of hot-patched functions and dll/dxhook.cpp for the actual hot-patching.