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:
parent
5ca46c50f8
commit
2a548252d1
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue