From bad2183087185c1ddd7cacf2fe68be1a7429499f Mon Sep 17 00:00:00 2001 From: chengjiansu Date: Sat, 28 Feb 2026 10:56:55 +0800 Subject: [PATCH] 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 Signed-off-by: Romain Vimont --- app/src/cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/cli.c b/app/src/cli.c index c3a95583..9373bdbd 100644 --- a/app/src/cli.c +++ b/app/src/cli.c @@ -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; }