Increase display id range
Some devices use big display id values. Refs #2009 <https://github.com/Genymobile/scrcpy/issues/2009>
This commit is contained in:
parent
ed130e05d5
commit
aa8b571389
4 changed files with 7 additions and 7 deletions
|
@ -478,14 +478,14 @@ parse_port_range(const char *s, struct sc_port_range *port_range) {
|
|||
}
|
||||
|
||||
static bool
|
||||
parse_display_id(const char *s, uint16_t *display_id) {
|
||||
parse_display_id(const char *s, uint32_t *display_id) {
|
||||
long value;
|
||||
bool ok = parse_integer_arg(s, &value, false, 0, 0xFFFF, "display id");
|
||||
bool ok = parse_integer_arg(s, &value, false, 0, 0x7FFFFFFF, "display id");
|
||||
if (!ok) {
|
||||
return false;
|
||||
}
|
||||
|
||||
*display_id = (uint16_t) value;
|
||||
*display_id = (uint32_t) value;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ struct scrcpy_options {
|
|||
int16_t window_y; // SC_WINDOW_POSITION_UNDEFINED for "auto"
|
||||
uint16_t window_width;
|
||||
uint16_t window_height;
|
||||
uint16_t display_id;
|
||||
uint32_t display_id;
|
||||
bool show_touches;
|
||||
bool fullscreen;
|
||||
bool always_on_top;
|
||||
|
|
|
@ -258,12 +258,12 @@ execute_server(struct server *server, const struct server_params *params) {
|
|||
char bit_rate_string[11];
|
||||
char max_fps_string[6];
|
||||
char lock_video_orientation_string[5];
|
||||
char display_id_string[6];
|
||||
char display_id_string[11];
|
||||
sprintf(max_size_string, "%"PRIu16, params->max_size);
|
||||
sprintf(bit_rate_string, "%"PRIu32, params->bit_rate);
|
||||
sprintf(max_fps_string, "%"PRIu16, params->max_fps);
|
||||
sprintf(lock_video_orientation_string, "%"PRIi8, params->lock_video_orientation);
|
||||
sprintf(display_id_string, "%"PRIu16, params->display_id);
|
||||
sprintf(display_id_string, "%"PRIu32, params->display_id);
|
||||
const char *const cmd[] = {
|
||||
"shell",
|
||||
"CLASSPATH=" DEVICE_SERVER_PATH,
|
||||
|
|
|
@ -43,7 +43,7 @@ struct server_params {
|
|||
uint16_t max_fps;
|
||||
int8_t lock_video_orientation;
|
||||
bool control;
|
||||
uint16_t display_id;
|
||||
uint32_t display_id;
|
||||
bool show_touches;
|
||||
bool stay_awake;
|
||||
bool force_adb_forward;
|
||||
|
|
Loading…
Reference in a new issue