Merge pull request #12 from vifino/master

Fix xinput rotation.
This commit is contained in:
Esra Fernau 2020-03-05 23:46:27 +01:00 committed by GitHub
commit 8f2128c172
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 5 deletions

View File

@ -239,13 +239,13 @@ fn main() -> Result<(), String> {
vector: (-1.0, 0.0),
new_state: "90",
x_state: "right",
matrix: ["0", "-1", "1", "1", "0", "0", "0", "0", "1"],
matrix: ["0", "1", "0", "-1", "0", "1", "0", "0", "1"],
},
Orientation {
vector: (1.0, 0.0),
new_state: "270",
x_state: "left",
matrix: ["0", "1", "0", "-1", "0", "1", "0", "0", "1"],
matrix: ["0", "-1", "1", "1", "0", "0", "0", "0", "1"],
},
];
@ -317,9 +317,7 @@ fn main() -> Result<(), String> {
Command::new("xinput")
.arg("set-prop")
.arg(touchscreen)
.arg("Coordinate")
.arg("Transformation")
.arg("Matrix")
.arg("Coordinate Transformation Matrix")
.args(&matrix)
.spawn()
.expect("Xinput rotate command failed to start")