Skip to content

Comment on Why Castrol Honda Superbike crashes on (most) modern systemsparent

Comments

The author linked to the repo and the code is at 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.

The 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.

I'd just use WineD3D in this case; I'm sure there's dinput.dll too ported to Wine for Windows.

Apologies, that's what I meant to say. I blame that on my lack of coffee today, my bad.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.