Assign joystick buttons to keyboard

Here you can discuss the development of patches.

Assign joystick buttons to keyboard

Postby djrobx » 2005-6-17 @ 19:20

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.
You do not have the required permissions to view the files attached to this post.
User avatar
djrobx
Newbie
 
Posts: 2
Joined: 2005-6-17 @ 19:12

Re: A small but useful patch

Postby Hellmatic » 2006-4-30 @ 03:02

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.
User avatar
Hellmatic
Newbie
 
Posts: 6
Joined: 2006-4-29 @ 18:12

Re: A small but useful patch

Postby tycho1974 » 2006-8-17 @ 16:21

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?
User avatar
tycho1974
Newbie
 
Posts: 10
Joined: 2006-8-15 @ 16:30
Location: Bethesda, MD

Re: A small but useful patch

Postby DosFreak » 2006-8-17 @ 16:39

Probably because it's ancient.....
User avatar
DosFreak
l33t++
 
Posts: 9830
Joined: 2002-6-30 @ 16:35
Location: Your Head

Re: A small but useful patch

Postby tycho1974 » 2006-8-17 @ 16:57

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"...
User avatar
tycho1974
Newbie
 
Posts: 10
Joined: 2006-8-15 @ 16:30
Location: Bethesda, MD

Re: A small but useful patch

Postby wd » 2006-8-17 @ 17:25

Feel free to update/rewrite it.
wd
DOSBox Author
 
Posts: 10818
Joined: 2003-12-03 @ 21:23

Re: A small but useful patch

Postby Hellmatic » 2006-8-17 @ 23:46

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.
User avatar
Hellmatic
Newbie
 
Posts: 6
Joined: 2006-4-29 @ 18:12

Re: A small but useful patch

Postby tycho1974 » 2006-8-18 @ 01:17

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.)
User avatar
tycho1974
Newbie
 
Posts: 10
Joined: 2006-8-15 @ 16:30
Location: Bethesda, MD


Return to DOSBox Patches

Who is online

Users browsing this forum: No registered users and 3 guests