Re: Xpad Xbox 360 mods

[email protected] (Arthur Othieno) Tue, 7 Mar 2006 20:13:22 -0500
Newsgroups gmane.linux.ports.xbox.devel
Message-ID <20060308011322.GA22079@krypton>
On Mon, Dec 26, 2005 at 04:41:45PM -0500, Matthew A. Nicholson wrote:
> Here is a patch to the xpad.c driver with some minor textual changes, 
> and a fix for detecting the proper usb interface for the xbox 360 
> controller.
> 
> The controller has four usb interfaces, currently the driver detects 
> three of them as gamepads when only one should be detected.  This patch 
> fixes the problem by removing the two unused interfaces from the 
> usb_device_id table (xpad_table).

Applied. But please, see
http://www.zipworld.com.au/~akpm/linux/patches/stuff/tpp.txt for how
to submit patches properly in the future, particularly, 2: Subject:
and 5: The diff, thanks.

> --- xpad.c.orig	2005-12-26 16:33:11.000000000 -0500
> +++ xpad.c	2005-12-26 16:39:24.000000000 -0500
> @@ -72,13 +72,13 @@
>  
>  static struct xpad_device xpad_device[] = {
>  	/* please keep those ordered wrt. vendor/product ids
> -	  vendor, product, isMat, name                              */
> +	  vendor, product, isMat, name, is360                 */
>  	{ 0x044f, 0x0f07, 0, "Thrustmaster, Inc. Controller", 0},
>  	{ 0x045e, 0x0202, 0, "Microsoft Xbox Controller", 0},
>  	{ 0x045e, 0x0285, 0, "Microsoft Xbox Controller S", 0},
>  	{ 0x045e, 0x0287, 0, "Microsoft Xbox Controller S", 0},
>  	{ 0x045e, 0x0289, 0, "Microsoft Xbox Controller S", 0}, /* microsoft is stupid */
> -	{ 0x045e, 0x028e, 0, "Microsoft Xbox360 Controller", 1},
> +	{ 0x045e, 0x028e, 0, "Microsoft Xbox 360 Controller", 1},
>  	{ 0x046d, 0xca84, 0, "Logitech Xbox Cordless Controller", 0},
>  	{ 0x046d, 0xca88, 0, "Logitech Compact Controller for Xbox", 0},
>  	{ 0x05fd, 0x1007, 0, "???Mad Catz Controller???", 0}, /* CHECKME: this seems strange */
> @@ -138,8 +138,6 @@
>  static struct usb_device_id xpad_table [] = {
>  	{ USB_INTERFACE_INFO('X', 'B', 0) },	/* Xbox USB-IF not approved class */
>  	{ USB_INTERFACE_INFO( 3 ,  0 , 0) },	/* for Joytech Advanced Controller */
> -	{ USB_INTERFACE_INFO( 255 ,  93 , 3) },	/* Xbox 360 */
> -	{ USB_INTERFACE_INFO( 255 ,  93 , 2) }, /* Xbox 360 */
>  	{ USB_INTERFACE_INFO( 255 ,  93 , 1) }, /* Xbox 360 */
>  	{ }
>  };
> @@ -565,7 +563,7 @@
>   *  driver history
>   * ----------------
>   *
> - * 2005-11-25 - 0.1.6 : Added Xbox360 Controller support
> + * 2005-11-25 - 0.1.6 : Added Xbox 360 Controller support
>   * 
>   * 2005-03-15 - 0.1.5 : Mouse emulation removed.  Deadzones increased.
>   *  - Flipped the Y axis of the left joystick (it was inverted, like on a 


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642