xpad.c patch to make triggers report as buttons as well as analog

Jesse Guardiani <[email protected]> Mon, 2 Jan 2006 19:20:09 +0000 (UTC)
Newsgroups gmane.linux.ports.xbox.devel
Message-ID <[email protected]>
Hello,

I've found myself wanting to use the Xbox controller's left and right triggers
as non-analog buttons recently. All the other analog buttons support this, so
why not the triggers?

So I wrote a patch against the CVS version of xpad.c from today. I renamed the
Xbox 360's additional triggers as TL2 and TR2, and named the xbox triggers TL
and TR.

This patch shifts the button mappings a bit, so anyone using it would have to
reconfigure their games, but I like it as it allows me to use the triggers in
snes9x and mame.

NOTE: I've only tested this patch with xbox controllers, not xbox 360
controllers as I don't have any 360 controllers.

-- 
Jesse Guardiani



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click