mirror of
https://github.com/Genymobile/scrcpy
synced 2025-08-30 13:58:08 +00:00
Move empty string test for crop option parsing
For consistency with other options.
This commit is contained in:
parent
76a99a7fcd
commit
b7ad652a75
@ -256,7 +256,9 @@ public class Options {
|
||||
options.tunnelForward = Boolean.parseBoolean(value);
|
||||
break;
|
||||
case "crop":
|
||||
options.crop = parseCrop(value);
|
||||
if (!value.isEmpty()) {
|
||||
options.crop = parseCrop(value);
|
||||
}
|
||||
break;
|
||||
case "control":
|
||||
options.control = Boolean.parseBoolean(value);
|
||||
@ -337,9 +339,6 @@ public class Options {
|
||||
}
|
||||
|
||||
private static Rect parseCrop(String crop) {
|
||||
if (crop.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
// input format: "width:height:x:y"
|
||||
String[] tokens = crop.split(":");
|
||||
if (tokens.length != 4) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user