mirror of
https://github.com/Genymobile/scrcpy
synced 2025-08-30 13:58:08 +00:00
Simplify sc_size assignment
Assign the whole struct instead of each field separately.
This commit is contained in:
@@ -101,8 +101,7 @@ get_optimal_size(struct sc_size current_size, struct sc_size content_size) {
|
|||||||
struct sc_size display_size;
|
struct sc_size display_size;
|
||||||
if (!get_preferred_display_bounds(&display_size)) {
|
if (!get_preferred_display_bounds(&display_size)) {
|
||||||
// could not get display bounds, do not constraint the size
|
// could not get display bounds, do not constraint the size
|
||||||
window_size.width = current_size.width;
|
window_size = current_size;
|
||||||
window_size.height = current_size.height;
|
|
||||||
} else {
|
} else {
|
||||||
window_size.width = MIN(current_size.width, display_size.width);
|
window_size.width = MIN(current_size.width, display_size.width);
|
||||||
window_size.height = MIN(current_size.height, display_size.height);
|
window_size.height = MIN(current_size.height, display_size.height);
|
||||||
|
Reference in New Issue
Block a user