summarylogtreecommitdiffstats
path: root/v14.1-fix-defaults1.patch
blob: a057f043c4320b5f91a493f6fca3a26e1ea4c6a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
diff --git a/drivers/hid/hid-asus-rog.c b/drivers/hid/hid-asus-rog.c
index 91f3a7786893..d765ca7fc3a9 100644
--- a/drivers/hid/hid-asus-rog.c
+++ b/drivers/hid/hid-asus-rog.c
@@ -1396,31 +1396,33 @@ static int asus_rog_ally_probe(struct hid_device *hdev, const struct rog_ops *op
 				}
 				// TODO: move these to functions
 				drvdata->rog_ally_data->mode = xpad_mode_game;
-				drvdata->rog_ally_data->deadzones[xpad_mode_game][0][1] = 64;
-				drvdata->rog_ally_data->deadzones[xpad_mode_game][0][3] = 64;
-				drvdata->rog_ally_data->deadzones[xpad_mode_game][1][1] = 64;
-				drvdata->rog_ally_data->deadzones[xpad_mode_game][1][3] = 64;
-
-				drvdata->rog_ally_data->anti_deadzones[xpad_mode_game][0] = 64;
-				drvdata->rog_ally_data->anti_deadzones[xpad_mode_game][1] = 64;
-
-				drvdata->rog_ally_data->response_curve[xpad_mode_game][0][0] = 0x14;
-				drvdata->rog_ally_data->response_curve[xpad_mode_game][0][1] = 0x14;
-				drvdata->rog_ally_data->response_curve[xpad_mode_game][0][2] = 0x28;
-				drvdata->rog_ally_data->response_curve[xpad_mode_game][0][3] = 0x28;
-				drvdata->rog_ally_data->response_curve[xpad_mode_game][0][4] = 0x3c;
-				drvdata->rog_ally_data->response_curve[xpad_mode_game][0][5] = 0x3c;
-				drvdata->rog_ally_data->response_curve[xpad_mode_game][0][6] = 0x50;
-				drvdata->rog_ally_data->response_curve[xpad_mode_game][0][7] = 0x50;
-
-				drvdata->rog_ally_data->response_curve[xpad_mode_game][1][0] = 0x14;
-				drvdata->rog_ally_data->response_curve[xpad_mode_game][1][1] = 0x14;
-				drvdata->rog_ally_data->response_curve[xpad_mode_game][1][2] = 0x28;
-				drvdata->rog_ally_data->response_curve[xpad_mode_game][1][3] = 0x28;
-				drvdata->rog_ally_data->response_curve[xpad_mode_game][1][4] = 0x3c;
-				drvdata->rog_ally_data->response_curve[xpad_mode_game][1][5] = 0x3c;
-				drvdata->rog_ally_data->response_curve[xpad_mode_game][1][6] = 0x50;
-				drvdata->rog_ally_data->response_curve[xpad_mode_game][1][7] = 0x50;
+				for (int i = 0; i < xpad_mode_mouse; i++) {
+					drvdata->rog_ally_data->deadzones[i][0][1] = 64;
+					drvdata->rog_ally_data->deadzones[i][0][3] = 64;
+					drvdata->rog_ally_data->deadzones[i][1][1] = 64;
+					drvdata->rog_ally_data->deadzones[i][1][3] = 64;
+
+					drvdata->rog_ally_data->response_curve[i][0][0] = 0x14;
+					drvdata->rog_ally_data->response_curve[i][0][1] = 0x14;
+					drvdata->rog_ally_data->response_curve[i][0][2] = 0x28;
+					drvdata->rog_ally_data->response_curve[i][0][3] = 0x28;
+					drvdata->rog_ally_data->response_curve[i][0][4] = 0x3c;
+					drvdata->rog_ally_data->response_curve[i][0][5] = 0x3c;
+					drvdata->rog_ally_data->response_curve[i][0][6] = 0x50;
+					drvdata->rog_ally_data->response_curve[i][0][7] = 0x50;
+
+					drvdata->rog_ally_data->response_curve[i][1][0] = 0x14;
+					drvdata->rog_ally_data->response_curve[i][1][1] = 0x14;
+					drvdata->rog_ally_data->response_curve[i][1][2] = 0x28;
+					drvdata->rog_ally_data->response_curve[i][1][3] = 0x28;
+					drvdata->rog_ally_data->response_curve[i][1][4] = 0x3c;
+					drvdata->rog_ally_data->response_curve[i][1][5] = 0x3c;
+					drvdata->rog_ally_data->response_curve[i][1][6] = 0x50;
+					drvdata->rog_ally_data->response_curve[i][1][7] = 0x50;
+
+					drvdata->rog_ally_data->vibration_intensity[i][0] = 64;
+					drvdata->rog_ally_data->vibration_intensity[i][1] = 64;
+				}
 
 				ret = __gamepad_set_mode(&hdev->dev, xpad_mode_game);
 				if (ret < 0)