mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-03-26 22:14:30 +01:00
Compare commits
5 Commits
orientatio
...
orientatio
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
94031dfe97 | ||
|
|
b43a9e8e7a | ||
|
|
a9d6cb5837 | ||
|
|
2f92686930 | ||
|
|
bb88b60227 |
@@ -2138,7 +2138,7 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[],
|
||||
opts->display_orientation = SC_ORIENTATION_180;
|
||||
break;
|
||||
case 3:
|
||||
// rotation 1 was 270° counterclockwise, but orientation
|
||||
// rotation 3 was 270° counterclockwise, but orientation
|
||||
// is expressed clockwise
|
||||
opts->display_orientation = SC_ORIENTATION_90;
|
||||
break;
|
||||
@@ -2531,7 +2531,8 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[],
|
||||
if (opts->record_orientation != SC_ORIENTATION_0) {
|
||||
if (sc_orientation_is_mirror(opts->record_orientation)) {
|
||||
LOGE("Record orientation only supports rotation, not "
|
||||
"flipping: %s", optarg);
|
||||
"flipping: %s",
|
||||
sc_orientation_get_name(opts->record_orientation));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,10 +113,10 @@ sc_orientation_apply(enum sc_orientation src, enum sc_orientation transform) {
|
||||
// In the final result, we want all the hflips then all the rotations,
|
||||
// so we must move hflip2 to the left:
|
||||
//
|
||||
// hflip1 × hflip2 × f(rotate1) × rotate2
|
||||
// hflip1 × hflip2 × rotate1' × rotate2
|
||||
//
|
||||
// with f(rotate1) = | rotate1 if src is 0 or 180
|
||||
// | rotate1 + 180 if src is 90 or 270
|
||||
// with rotate1' = | rotate1 if src is 0° or 180°
|
||||
// | rotate1 + 180° if src is 90° or 270°
|
||||
|
||||
src_rotation += 2;
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ scrcpy --orientation=270 # 270° clockwise
|
||||
scrcpy --orientation=flip0 # hflip
|
||||
scrcpy --orientation=flip90 # hflip + 90° clockwise
|
||||
scrcpy --orientation=flip180 # vflip (hflip + 180°)
|
||||
scrcpy --orientation=flip270 # hflip + 270°
|
||||
scrcpy --orientation=flip270 # hflip + 270° clockwise
|
||||
```
|
||||
|
||||
The orientation can be set separately for display and record if necessary, via
|
||||
|
||||
Reference in New Issue
Block a user