mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-12-18 14:04:20 +01:00
Group server params in a struct
Starting the server requires more and more parameters. For clarity, group them in a struct.
This commit is contained in:
@@ -271,9 +271,14 @@ av_log_callback(void *avcl, int level, const char *fmt, va_list vl) {
|
||||
bool
|
||||
scrcpy(const struct scrcpy_options *options) {
|
||||
bool record = !!options->record_filename;
|
||||
if (!server_start(&server, options->serial, options->port,
|
||||
options->max_size, options->bit_rate, options->crop,
|
||||
record)) {
|
||||
struct server_params params = {
|
||||
.crop = options->crop,
|
||||
.local_port = options->port,
|
||||
.max_size = options->max_size,
|
||||
.bit_rate = options->bit_rate,
|
||||
.send_frame_meta = record,
|
||||
};
|
||||
if (!server_start(&server, options->serial, ¶ms)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user