I have a Linux kernel hack to get the hat switch working.

For system help, all hardware / software topics NOTE: use Coders Corner for all coders topics.

Moderators: Krom, Grendel

Post Reply
xenu
DBB Cadet
DBB Cadet
Posts: 7
Joined: Sun Jan 02, 2005 10:07 pm

I have a Linux kernel hack to get the hat switch working.

Post by xenu »

The hat switch does not work on some joysticks, Thrustmaster Top gun afterburner(what teh ghey name for what is actually a half decent stick) and at least one SaiTek model. Probly lots of others.

The crux of the issue is that D3 wants hats to show up as switches, and the Linux kernel presents them as axes.

I finally finished a working hack to make a hat show up as a switch, Works damn good in D3. I'm just not sure how to post it here.

It's for 2.4.29 but I'm sure it could be easily adapted for other kernels.

Ironic that I can create a working kernel hack, but I don't know how to generate a patchfile. Use diff I guess, but I'm not sure what arguments to give it so it will work right for others. Help appreciated.

If anyone is interested in it, let me know and I'll find a way to get it to you. I can also provide the entire working joydev.c source.

Markus aka Xenu

PS: Any word on linux D3 1.5?
User avatar
FunkyStickman
DBB Ace
DBB Ace
Posts: 309
Joined: Wed Apr 20, 2005 2:26 pm
Location: 'Nawlins

Post by FunkyStickman »

Congrats. THe only thing I use my HAT switch for now is banking, which works fine as an axis. After fighting with the primary weapon "toggle" function I got fed up and went to a direct-button maping of the weapons, haven't looked back.

I looked at the joydev.c file not too long ago, and a few people have managed to hack it to fool the kernel, but I haven't had the need yet. I don't mind looking at the code, if you commented it ;)

And as for the 1.5 patch for Linux, well, who knows.
User avatar
Xamindar
DBB Admiral
DBB Admiral
Posts: 1498
Joined: Sun Jun 06, 2004 2:44 am
Location: California
Contact:

Re: I have a Linux kernel hack to get the hat switch working

Post by Xamindar »

xenu wrote: It's for 2.4.29 but I'm sure it could be easily adapted for other kernels.
Nice, I haven't had this need though as I use a sidewinder 3d pro.
xenu
DBB Cadet
DBB Cadet
Posts: 7
Joined: Sun Jan 02, 2005 10:07 pm

Not commented

Post by xenu »

But it's fairly straight forward. I think if I just marked what part I changed, you'll get it.

How can I post it here?
Post Reply