mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-08-20 09:20:47 +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);
|
||||
}
|
||||
|
||||
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…
Add table
Add a link
Reference in a new issue