mirror of
https://github.com/Genymobile/scrcpy
synced 2025-08-22 01:47:37 +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
@ -32,9 +32,11 @@ public enum Orientation {
|
||||
throw new IllegalArgumentException("Unknown orientation: " + name);
|
||||
}
|
||||
|
||||
public static Orientation fromRotation(int rotation) {
|
||||
assert rotation >= 0 && rotation < 4;
|
||||
return values()[rotation];
|
||||
public static Orientation fromRotation(int ccwRotation) {
|
||||
assert ccwRotation >= 0 && ccwRotation < 4;
|
||||
// Display rotation is expressed counter-clockwise, orientation is expressed clockwise
|
||||
int cwRotation = (4 - ccwRotation) % 4;
|
||||
return values()[cwRotation];
|
||||
}
|
||||
|
||||
public boolean isFlipped() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user