mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-12-18 14:04:20 +01:00
Group scrcpy options into a struct
The scrcpy() function accepts as many parameters as there are options. To simplify, group all options in a separate struct.
This commit is contained in:
@@ -271,7 +271,13 @@ int main(int argc, char *argv[]) {
|
||||
SDL_LogSetAllPriority(SDL_LOG_PRIORITY_DEBUG);
|
||||
#endif
|
||||
|
||||
int res = scrcpy(args.serial, args.port, args.max_size, args.bit_rate) ? 0 : 1;
|
||||
struct scrcpy_options options = {
|
||||
.serial = args.serial,
|
||||
.port = args.port,
|
||||
.max_size = args.max_size,
|
||||
.bit_rate = args.bit_rate,
|
||||
};
|
||||
int res = scrcpy(&options) ? 0 : 1;
|
||||
|
||||
avformat_network_deinit(); // ignore failure
|
||||
|
||||
|
||||
Reference in New Issue
Block a user