Fix inverted left/right rotation with Xorg backend

The accelerometer to Xorg orientation mapping had left and right
inverted, causing the output to flip opposite the desired direction when
used sideways.
This commit is contained in:
mnussbaum 2019-09-06 00:00:27 -07:00
parent 5ca46c50f8
commit 2a548252d1
1 changed files with 2 additions and 2 deletions

View File

@ -169,7 +169,7 @@ fn main() -> Result<(), String> {
matrix = ["-1", "0", "1", "0", "-1", "1", "0", "0", "1"]; matrix = ["-1", "0", "1", "0", "-1", "1", "0", "0", "1"];
} else { } else {
new_state = "90"; new_state = "90";
x_state = "left"; x_state = "right";
matrix = ["0", "-1", "1", "1", "0", "0", "0", "0", "1"]; matrix = ["0", "-1", "1", "1", "0", "0", "0", "0", "1"];
} }
} else if x > 500000 { } else if x > 500000 {
@ -179,7 +179,7 @@ fn main() -> Result<(), String> {
matrix = ["-1", "0", "1", "0", "-1", "1", "0", "0", "1"]; matrix = ["-1", "0", "1", "0", "-1", "1", "0", "0", "1"];
} else { } else {
new_state = "270"; new_state = "270";
x_state = "right"; x_state = "left";
matrix = ["0", "1", "0", "-1", "0", "1", "0", "0", "1"]; matrix = ["0", "1", "0", "-1", "0", "1", "0", "0", "1"];
} }
} else { } else {