mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-08-21 09:49:06 +00:00
Fix default locked capture orientation
The default landscape locked orientation was reversed. Fixes #6010 <https://github.com/Genymobile/scrcpy/issues/6010>
This commit is contained in:
parent
6875e9aa88
commit
48f38c4bb6
1 changed files with 5 additions and 3 deletions
|
@ -32,9 +32,11 @@ public enum Orientation {
|
||||||
throw new IllegalArgumentException("Unknown orientation: " + name);
|
throw new IllegalArgumentException("Unknown orientation: " + name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Orientation fromRotation(int rotation) {
|
public static Orientation fromRotation(int ccwRotation) {
|
||||||
assert rotation >= 0 && rotation < 4;
|
assert ccwRotation >= 0 && ccwRotation < 4;
|
||||||
return values()[rotation];
|
// Display rotation is expressed counter-clockwise, orientation is expressed clockwise
|
||||||
|
int cwRotation = (4 - ccwRotation) % 4;
|
||||||
|
return values()[cwRotation];
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isFlipped() {
|
public boolean isFlipped() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue