6 ms·
The author linked to the repo and the code is at https://github.com/seritools/castrol-honda-dinput-fix/blob/main/src/lib.rs https://github.com/seritools/castrol
by xx_ns 10mo ago
The author linked to the repo and the code is at https://github.com/seritools/castrol-honda-dinput-fix/blob/main/src/lib.rs https://github.com/seritools/castrol-honda-dinput-fix/blob/m...
Seems pretty straightforward. They hook DirectInputCreateA() and pass their own device enumeration wrapper with the offending flag removed.
- tialaramex 10mo agoThe flag DIDEVTYPE_JOYSTICK was added by this fix not removed. The idea is, rather than handle up to 8 devices, otherwise UB and usually crash, handle up to 8 "joysticks" and disregard any beyond that.