mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-04-21 01:33:36 +00:00
Factorize --list- options handling
This will limit code duplication as more list options will be added. PR #4213 <https://github.com/Genymobile/scrcpy/pull/4213>
This commit is contained in:
parent
a2fb1b40f6
commit
f085765e04
8 changed files with 17 additions and 15 deletions
|
|
@ -153,6 +153,10 @@ public class Options {
|
|||
return powerOn;
|
||||
}
|
||||
|
||||
public boolean getList() {
|
||||
return listEncoders || listDisplays;
|
||||
}
|
||||
|
||||
public boolean getListEncoders() {
|
||||
return listEncoders;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ public final class Server {
|
|||
|
||||
Ln.initLogLevel(options.getLogLevel());
|
||||
|
||||
if (options.getListEncoders() || options.getListDisplays()) {
|
||||
if (options.getList()) {
|
||||
if (options.getCleanup()) {
|
||||
CleanUp.unlinkSelf();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue