Add virtual display feature by rom1v · Pull Request #5370 · Genymobile/scrcpy (original) (raw)
This was referenced
Oct 12, 2024
This was referenced
Oct 12, 2024
1 task
rom1v added a commit that referenced this pull request
When mirroring a secondary display, touch and scroll events must be sent to the mirroring virtual display id (with coordinates relative to the virtual display size), rather than to the original display (with coordinates relative to the original display size).
This behavior, introduced by d193967, was also applied for the main display for consistency. However, it has been found to cause some UI elements to become unclickable.
To minimize inconveniences, restore the previous behavior when mirroring the main display: send all events to the original display id (0) with coordinates relative to the original display size.
Fixes #5545 <#5545> Fixes #5605 <#5605> Refs #4598 <#4598> Refs #5137 <#5137> Refs #5370 <#5370>
rom1v mentioned this pull request
rom1v added a commit that referenced this pull request
When mirroring a secondary display, touch and scroll events must be sent to the mirroring virtual display id (with coordinates relative to the virtual display size), rather than to the original display (with coordinates relative to the original display size).
This behavior, introduced by d193967, was also applied for the main display for consistency. However, it causes some UI elements to become unclickable.
To minimize inconveniences, restore the previous behavior when mirroring the main display: send all events to the original display id (0) with coordinates relative to the original display size.
Fixes #5545 <#5545> Fixes #5605 <#5605> Fixes #5616 <#5616> Refs #4598 <#4598> Refs #5137 <#5137> Refs #5370 <#5370> PR #5614 <#5614>
rom1v mentioned this pull request
This was referenced
Jan 27, 2025
bartsaintgermain pushed a commit to bartsaintgermain/scrcpy that referenced this pull request
Move the code related to screen size and rotation/fold to ScreenCapture.
For now, keep the ScreenInfo instance in the Device class to communicate with the Controller, but it will be removed by further commits.
PR Genymobile#5370 <Genymobile#5370>
bartsaintgermain pushed a commit to bartsaintgermain/scrcpy that referenced this pull request
bartsaintgermain pushed a commit to bartsaintgermain/scrcpy that referenced this pull request
bartsaintgermain pushed a commit to bartsaintgermain/scrcpy that referenced this pull request
bartsaintgermain pushed a commit to bartsaintgermain/scrcpy that referenced this pull request
bartsaintgermain pushed a commit to bartsaintgermain/scrcpy that referenced this pull request
Add a function called before each capture starts (before getSize() is called).
This allows to compute the ScreenInfo instance once exactly when needed.
PR Genymobile#5370 <Genymobile#5370>
bartsaintgermain pushed a commit to bartsaintgermain/scrcpy that referenced this pull request
Remove from Device the functions using an implicit displayId.
Move them to Controller, which knows best which displayId it must use.
This will allow to properly dispatch events either to the origin display or to the virtual display created for mirroring.
PR Genymobile#5370 <Genymobile#5370>
bartsaintgermain pushed a commit to bartsaintgermain/scrcpy that referenced this pull request
bartsaintgermain pushed a commit to bartsaintgermain/scrcpy that referenced this pull request
Extract the function that converts coordinates from video space to display space into a separate component.
It only requires the specific data it uses and does not need a full ScreenInfo object (although it can be created from a ScreenInfo instance).
PR Genymobile#5370 <Genymobile#5370>
bartsaintgermain pushed a commit to bartsaintgermain/scrcpy that referenced this pull request
When a new capture starts, send a new PositionMapper to the Controller without using the global Device as an intermediate.
Now all Device methods are static.
PR Genymobile#5370 <Genymobile#5370>
bartsaintgermain pushed a commit to bartsaintgermain/scrcpy that referenced this pull request
bartsaintgermain pushed a commit to bartsaintgermain/scrcpy that referenced this pull request
bartsaintgermain pushed a commit to bartsaintgermain/scrcpy that referenced this pull request
Add a feature to create a new (separate) virtual display instead of mirroring the device screen:
scrcpy --new-display=1920x1080
scrcpy --new-display=1920x1080/420 # force 420 dpi
scrcpy --new-display # use the main display size and density
scrcpy --new-display -m1920 # scaled to fit a max size of 1920
scrcpy --new-display=/240 # use the main display size and 240 dpiFixes Genymobile#1887 <Genymobile#1887> PR Genymobile#5370 <Genymobile#5370>
Co-authored-by: Simon Chan 1330321+yume-chan@users.noreply.github.com Co-authored-by: anirudhb anirudhb@users.noreply.github.com
bartsaintgermain pushed a commit to bartsaintgermain/scrcpy that referenced this pull request
bartsaintgermain pushed a commit to bartsaintgermain/scrcpy that referenced this pull request
rom1v mentioned this pull request
1 task
rom1v mentioned this pull request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})