Compare commits

..

5 Commits

Author SHA1 Message Date
chengjiansu
bad2183087 Fix orientation error message
When running `scrcpy --capture-orientation=@100`, the error shown is:

> Unsupported orientation: @100 (expected 0, 90, 180, 270, flip0, flip90, flip180 or flip270)

We should tell the user that the error is 100, not @100.

Moreover, the function parse_orientation() should not access the
`optarg` global variable.

PR #6695 <https://github.com/Genymobile/scrcpy/pull/6695>

Signed-off-by: Romain Vimont <rom@rom1v.com>
2026-03-10 20:14:23 +01:00
Romain Vimont
e17a885f32 Draw a dark square when no texture is rendered
Draw a dark 10x10 square in the top-right corner to distinguish a black
frame from the absence of a frame (useful for debugging).

PR #6694 <https://github.com/Genymobile/scrcpy/pull/6694>
2026-03-10 20:11:04 +01:00
Romain Vimont
691a63761c Open the scrcpy window earlier
Previously, the window was opened only once the first frame was
available. Instead, open it as soon as the frame dimensions are known.

This is especially useful when the encoder does not produce an initial
frame while the phone is turned off (e.g., with --no-power-on).

Fixes #6546 <https://github.com/Genymobile/scrcpy/issues/6546>
PR #6694 <https://github.com/Genymobile/scrcpy/pull/6694>
2026-03-10 20:11:04 +01:00
Romain Vimont
57af6b9209 Track window shown state
Use a flag to indicate whether the window is currently shown.

This replaces the old has_video_window flag, which was true only when
the window was shown and video was enabled.

This will simplify performing actions only when the window is currently
shown.

PR #6694 <https://github.com/Genymobile/scrcpy/pull/6694>
2026-03-10 20:11:04 +01:00
Romain Vimont
0597c5eb8d Remove unnecessary void cast
The ctx variable is used.

PR #6694 <https://github.com/Genymobile/scrcpy/pull/6694>
2026-03-10 20:11:04 +01:00

View File

@@ -1729,7 +1729,7 @@ parse_orientation(const char *s, enum sc_orientation *orientation) {
return true;
}
LOGE("Unsupported orientation: %s (expected 0, 90, 180, 270, flip0, "
"flip90, flip180 or flip270)", optarg);
"flip90, flip180 or flip270)", s);
return false;
}