If the comments in my code can be believed, the thing was your youstick not offering a Z axis but a slider instead. The two should be identical, except that DirectInput defaults to Z for throttle and your slider was inverted over the normal Z, for whatever reason. So you had no throttle and if you re-mapped the axis, the throttle was inverted.
Yes, absolutely. DirectInput did handle this stuff in a great way. Then MS decided that they wanted to use their monopoly to push the XBox controller*, and so they stopped DirectInput from supporting that controller and forced the XInput API on us instead. Now the genie was out of the bottle and everyone started using proprietary APIs again, and games started ditching DirectInput because it no longer worked with all controllers.Aside from TFXplorer, joysticks used to 'just work' in the old days, maybe due to DirectInput (or whatever it was called).
Things seem more complicated now with AC7 needed a branded joystick, and MSFS2020 not providing a sensible default for generic sticks. So, I had to use an XBox controller for these.
IIRC, the one thing that cannot be done without DirectInput is force feedback. Even if you’re working directly with USB data (like TFXplorer does) you still have to go through the DirectInput protocol for that. Would love to hear what Linux does in this regard.
* There may have been the small technical reason that the XBox controller has more than six axes (every button is pressure-sensitive IIRC), and DirectInput was very bad at handling that. It would have been trivial to fix in an updated version, though.