distribution/packages/network/bluez/patches/bluez-11_sixaxis-fix-PID-navigation-controller.patch

40 lines
1.2 KiB
Diff
Raw Normal View History

2022-03-19 02:16:23 +00:00
diff --git a/plugins/sixaxis.c b/plugins/sixaxis.c
2022-11-19 22:37:57 +00:00
index 544ab399a..9a0aa5d4f 100644
2022-02-05 14:23:32 +00:00
--- a/plugins/sixaxis.c
+++ b/plugins/sixaxis.c
2022-11-19 22:37:57 +00:00
@@ -349,7 +349,13 @@ static bool setup_device(int fd, const char *sysfs_path,
2022-02-05 14:23:32 +00:00
info("sixaxis: setting up new device");
btd_device_device_set_name(device, cp->name);
- btd_device_set_pnpid(device, cp->source, cp->vid, cp->pid, cp->version);
+
+ /* if device reports different pid/vid on BT prefer those over USB */
+ if (cp->bt_pid)
+ btd_device_set_pnpid(device, cp->source, cp->vid, cp->bt_pid, cp->version);
+ else
+ btd_device_set_pnpid(device, cp->source, cp->vid, cp->pid, cp->version);
+
btd_device_set_temporary(device, true);
2022-11-19 22:37:57 +00:00
closure = g_new0(struct authentication_closure, 1);
2022-03-19 02:16:23 +00:00
diff --git a/profiles/input/sixaxis.h b/profiles/input/sixaxis.h
2022-11-19 22:37:57 +00:00
index ab8831995..0fe373204 100644
2022-02-05 14:23:32 +00:00
--- a/profiles/input/sixaxis.h
+++ b/profiles/input/sixaxis.h
2022-11-19 22:37:57 +00:00
@@ -25,6 +25,7 @@ struct cable_pairing {
2022-02-05 14:23:32 +00:00
uint16_t vid;
uint16_t pid;
uint16_t version;
+ uint16_t bt_pid;
CablePairingType type;
};
2022-11-19 22:37:57 +00:00
@@ -54,6 +55,7 @@ get_pairing(uint16_t vid, uint16_t pid, const char *name)
2022-02-05 14:23:32 +00:00
.vid = 0x054c,
.pid = 0x042f,
.version = 0x0000,
+ .bt_pid = 0x0268,
.type = CABLE_PAIRING_SIXAXIS,
},
{