aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2022-04-02 21:30:40 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2022-04-02 21:30:40 +0300
commitc06a80f1d1e2ef003eb99d8b1fb24e9562f5eb27 (patch)
treefd28ce3ce14cb291d5d781e9093e033d1971df4b
parent864a7c582518538c209f5d81043816b5e2696ca3 (diff)
downloadhid-tmff2-c06a80f1d1e2ef003eb99d8b1fb24e9562f5eb27.tar.gz
hid-tmff2-c06a80f1d1e2ef003eb99d8b1fb24e9562f5eb27.zip
set alt_mode to not reset the wheel's mode
-rw-r--r--hid-tmt300rs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hid-tmt300rs.c b/hid-tmt300rs.c
index 2c44d1e..d637431 100644
--- a/hid-tmt300rs.c
+++ b/hid-tmt300rs.c
@@ -1170,6 +1170,7 @@ static int t300rs_switch_mode(void *data, uint16_t mode)
if (!t300rs)
return -ENODEV;
+ hid_info(t300rs->hdev, "switch\n");
if(t300rs->mode == mode) /* already in specified mode */
return 0;
@@ -1566,7 +1567,7 @@ static int t300rs_wheel_init(struct tmff2_device_entry *tmff2)
t300rs->close = t300rs->input_dev->close;
/* TODO: PS4 advanced mode? */
- t300rs->mode = (t300rs->hdev->product == TMT300RS_PS3_ADV_ID);
+ alt_mode = t300rs->mode = (t300rs->hdev->product == TMT300RS_PS3_ADV_ID);
if ((t300rs->attachment = t300rs_get_attachment(t300rs)) < 0)
t300rs->attachment = T300RS_DEFAULT_ATTACHMENT;