VOGONS

Common searches


First post, by djrobx

User metadata
Rank Newbie
Rank
Newbie

I apologize if this has been covered elsewhere but I think I read through most of the joystick related threads. Most are suggesting the use of Joy2Key to assign buttons to emulated keys, which I want to avoid.

The DosBox UI already allows you to assign joystick buttons to keypresses! It just doesn't work. It's missing a few lines of code that would otherwise enable it. Someone else posted an extensive update that involves a lot of joystick emulation and axis assignment options. It sounds like it hasn't made it into the core because people are having problems with certain aspects of it breaking functionality that's already present with the current version.

I have simply added a couple lines of code to enable the keyboard mapping already present, and nothing more. It's very "light" and shouldn't affect anything unless you've mapped some keys.

I've attached the .DIFF to enable this functionality incase it's useful to someone.

Attachments

  • Filename
    mapper.diff
    File size
    1020 Bytes
    Downloads
    140 downloads
    File comment
    Patch to enable use of joystick button mapping
    File license
    Fair use/fair dealing exception

Reply 1 of 7, by Hellmatic

User metadata
Rank Newbie
Rank
Newbie

Thank you, djrobx!

This patch does indeed work for joystick button assignments in the keymapper, but unfortunately not for joystick axis movements!
i.e.: we can assign the axis movements to specific keys but they don't work.

I tried to fix the code myself in sdl_mapper.cpp, but I think I lack the knowledge to do so (and there are no comments at all there to help understand the code). Could someone please fix this very old bug in DosBox?

PS: This issue has not been fixed in version 0.65.

Reply 2 of 7, by tycho1974

User metadata
Rank Newbie
Rank
Newbie

Please forgive my ignorance, but how does one go about applying this patch? I'd love to get this up and working on my box...and why aren't more people downloading this patch?

Reply 4 of 7, by tycho1974

User metadata
Rank Newbie
Rank
Newbie

Well, if this issue still hasn't been resolved in 0.65, then the patch, while old, is still useful imho.

BTW, I love how in today's world fourteen months is considered "ancient"...

Reply 6 of 7, by Hellmatic

User metadata
Rank Newbie
Rank
Newbie

The effect of this patch is already present in 0.65 (not sure if it was incorporated or re-implemented, check it out if you're curious). In summary:

0.63
- Button assignments don't work
- Axis movement assignments don't work

0.63 with this patch or 0.65
- Button assignments DO work
- Axis movement assignments still don't work

Cheers.

Reply 7 of 7, by tycho1974

User metadata
Rank Newbie
Rank
Newbie

I gotta argue against it working. Maybe I'm a luddite (I didn't think I was), but in the mapper and in mapper.txt, the extra joystick buttons are correctly mapped. In-game, however, they are not, and I double-checked to make sure I was using 0.65. (I am.)