Never increase dimensions when applying alignment
Previously, the minor dimension was rounded to the nearest multiple of the alignment requirement when constraining size. This could result in the dimension being increased. Change the behavior to always round down instead, ensuring the constrained size never grows. This fixes a conflict with the client-side "optimal window size" computation, which never increases dimensions. With flex displays, the old behavior could lead to feedback loop between window and display resizing with mismatched dimensions: - window resized to 2341x1317 - display resized to 2340x1318 - window resized to 2338x1317 - display resized to 2336x1318 PR #6772 <https://github.com/Genymobile/scrcpy/pull/6772>
R
Romain Vimont committed
0d73d84f84788f19b646e25bead31bc81ead3606
Parent: 01d49a2