mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-12-17 05:24:19 +01: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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user