Skip to content

Commit

Permalink
xpadneo, fixups: Adapt SDL fixup to fix the Xbox button
Browse files Browse the repository at this point in the history
A new SDL gamecontrollerdb entry allows us to get rid of the Xbox
button fixup we are carrying around. While this button is still not
exactly a button for games, all software expects it to be part of the
gamepad mapping anyways.

This leaves only the Share button left in the consumer control bits
which doesn't have an jsdev equivalent.

Affects: #286
Maybe-affects: #283
Fixes: #362
Fixes: #359
Closes: #301
Signed-off-by: Kai Krakow <[email protected]>
  • Loading branch information
kakra committed May 30, 2022
1 parent 7665842 commit 6429037
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions hid-xpadneo/src/hid-xpadneo.c
Original file line number Diff line number Diff line change
Expand Up @@ -897,8 +897,10 @@ static int xpadneo_input_configured(struct hid_device *hdev, struct hid_input *h
/* combine triggers to form a rudder, use ABS_MISC to order after dpad */
input_set_abs_params(xdata->idev, ABS_MISC, -1023, 1023, 3, 63);

/* do not report the consumer control buttons as part of the gamepad */
__clear_bit(BTN_SHARE, xdata->idev->keybit);

/* add paddles as part of the gamepad */
__set_bit(BTN_TRIGGER_HAPPY, xdata->idev->keybit); /* workaround for Steam */
__set_bit(BTN_PADDLES(0), xdata->idev->keybit);
__set_bit(BTN_PADDLES(1), xdata->idev->keybit);
__set_bit(BTN_PADDLES(2), xdata->idev->keybit);
Expand Down Expand Up @@ -1126,8 +1128,8 @@ static int xpadneo_probe(struct hid_device *hdev, const struct hid_device_id *id
*/
xdata->original_product = hdev->product;
xdata->original_version = hdev->version;
hdev->product = 0x02E0;
hdev->version = 0x00000903;
hdev->product = 0x02FD;
hdev->version = 0x00001130;

if (hdev->product != xdata->original_product)
hid_info(hdev,
Expand Down

0 comments on commit 6429037

Please sign in to comment.