Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
94031dfe97 | ||
|
|
b43a9e8e7a | ||
|
|
a9d6cb5837 | ||
|
|
2f92686930 | ||
|
|
bb88b60227 |
+3
-2
@@ -2138,7 +2138,7 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[],
|
|||||||
opts->display_orientation = SC_ORIENTATION_180;
|
opts->display_orientation = SC_ORIENTATION_180;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
// rotation 1 was 270° counterclockwise, but orientation
|
// rotation 3 was 270° counterclockwise, but orientation
|
||||||
// is expressed clockwise
|
// is expressed clockwise
|
||||||
opts->display_orientation = SC_ORIENTATION_90;
|
opts->display_orientation = SC_ORIENTATION_90;
|
||||||
break;
|
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 (opts->record_orientation != SC_ORIENTATION_0) {
|
||||||
if (sc_orientation_is_mirror(opts->record_orientation)) {
|
if (sc_orientation_is_mirror(opts->record_orientation)) {
|
||||||
LOGE("Record orientation only supports rotation, not "
|
LOGE("Record orientation only supports rotation, not "
|
||||||
"flipping: %s", optarg);
|
"flipping: %s",
|
||||||
|
sc_orientation_get_name(opts->record_orientation));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -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,
|
// In the final result, we want all the hflips then all the rotations,
|
||||||
// so we must move hflip2 to the left:
|
// 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
|
// with rotate1' = | rotate1 if src is 0° or 180°
|
||||||
// | rotate1 + 180 if src is 90 or 270
|
// | rotate1 + 180° if src is 90° or 270°
|
||||||
|
|
||||||
src_rotation += 2;
|
src_rotation += 2;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -130,7 +130,7 @@ scrcpy --orientation=270 # 270° clockwise
|
|||||||
scrcpy --orientation=flip0 # hflip
|
scrcpy --orientation=flip0 # hflip
|
||||||
scrcpy --orientation=flip90 # hflip + 90° clockwise
|
scrcpy --orientation=flip90 # hflip + 90° clockwise
|
||||||
scrcpy --orientation=flip180 # vflip (hflip + 180°)
|
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
|
The orientation can be set separately for display and record if necessary, via
|
||||||
|
|||||||
Reference in New Issue
Block a user