Accept negative window position

It seems to work on some window managers.

Fixes #1242 <https://github.com/Genymobile/scrcpy/issues/1242>
This commit is contained in:
Romain Vimont
2020-03-26 17:54:06 +01:00
parent 3504c0016b
commit dc7c677728
5 changed files with 25 additions and 11 deletions

View File

@@ -21,8 +21,8 @@ struct scrcpy_options {
uint32_t bit_rate;
uint16_t max_fps;
int8_t lock_video_orientation;
int16_t window_x;
int16_t window_y;
int16_t window_x; // WINDOW_POSITION_UNDEFINED for "auto"
int16_t window_y; // WINDOW_POSITION_UNDEFINED for "auto"
uint16_t window_width;
uint16_t window_height;
bool show_touches;
@@ -51,8 +51,8 @@ struct scrcpy_options {
.bit_rate = DEFAULT_BIT_RATE, \
.max_fps = 0, \
.lock_video_orientation = DEFAULT_LOCK_VIDEO_ORIENTATION, \
.window_x = -1, \
.window_y = -1, \
.window_x = WINDOW_POSITION_UNDEFINED, \
.window_y = WINDOW_POSITION_UNDEFINED, \
.window_width = 0, \
.window_height = 0, \
.show_touches = false, \