First post, by cfoesch
- Rank
- Newbie
I've tried to use my XBox360 controller with DOSBox every once and a while every so often, but it never works, because DOSBox won't let you bind any axes after the first four, and won't actually register bindings to the hat/d-pad either unless the hat/d-pad is supported by the emulated device. Not to mention that the XBox360 driver stupidly places the trigger/rudder axis as the 3rd axis, and thus totally breaking the "first two axes are joy1, second two axes are joy2" assumption made by DOSBox... and every other rational human being.
But think about it, if I'm remapping the d-pad to keys, then the emulated device doesn't _need_ to support the hat, right? So why would DOSBox block me from doing so? (Answer? DOSBox was arbitrarily capping the axes and hats to only what was being emulated.)
This patch removes a few MAGIC_NUMBERS in favor of defines, and also raises the scans on the axes and the hats for event handling so that you can actually bind all axes (up to 8 ), and hats (up to 2) to something...
Of course, the emulated environment will still only ever see the 4-axis or whatever you setup, this is simply a limitation of how joysticks were handled in DOS. However, at least now you can bind those otherwise useless axes to keys, and bind hat switch positions to your favorite emulated keys.
I shall now spend the next 8 hours playing my Descent with my entire gamepad, rather than the hideous horrible mess I was forced to use before, because Microsoft decided to be total idiots in laying out the axes on their controller...