Contrary to getenv(), the result of sc_get_env() is encoded in UTF-8 on
all platforms. Since it is allocated, it requires an explicit init() and
destroy() functions.
PR #5560 <https://github.com/Genymobile/scrcpy/pull/5560>
Contrary to getenv(), sc_get_env() returns an allocated string that is
guaranteed to be encoded in UTF-8 on all platforms (it uses _wgetenv()
internally on Windows and converts the strings).
PR #5560 <https://github.com/Genymobile/scrcpy/pull/5560>
The position of touch and scroll must normally be "resolved" with a
"position mapper" associated to the display.
But to support the injection of such events with scrcpy-server alone
without video, handle the case where there is no display.
Fixes#5542 <https://github.com/Genymobile/scrcpy/issues/5542>
On Windows, interrupting a socket with shutdown() does not wake up
accept() or read() calls, the socket must be closed.
Introduce a new macro constant SC_SOCKET_CLOSE_ON_INTERRUPT, distinct of
_WIN32, because Windows will not be the only platform exhibiting this
behavior.
Refs #5536 <https://github.com/Genymobile/scrcpy/issues/5536>
The command sha256sum does not exist on macOS, but `shasum -a256` works
both on Linux and macOS.
PR #5515 <https://github.com/Genymobile/scrcpy/pull/5515>
Co-authored-by: Romain Vimont <rom@rom1v.com>
Signed-off-by: Romain Vimont <rom@rom1v.com>
Make dependencies build scripts more flexible, to accept a build type
(native or cross) and a link type (static or shared).
This lays the groundwork for building binaries for Linux and macOS.
PR #5515 <https://github.com/Genymobile/scrcpy/pull/5515>
Extract the code that processes arguments into a function.
This will make it optional, so the script that only downloads the
official ADB binaries will not use arguments.
PR #5515 <https://github.com/Genymobile/scrcpy/pull/5515>
Since commit 2687d202809dfaafe8f40f613aec131ad9501433, the Makefile
named release.mk stopped handling dependencies between recipes, because
they have to be executed separately (from different Github Actions
jobs).
Using a Makefile no longer provides any real benefit. Replace it by
several individual release scripts for simplicity and readability.
Refs #5306 <https://github.com/Genymobile/scrcpy/pull/5306>
PR #5515 <https://github.com/Genymobile/scrcpy/pull/5515>
Allow capturing virtual displays at a lower resolution using
-m/--max-size.
In the original implementation in #5370, the virtual display size was
necessarily the same as the capture size. The --max-size value was only
allowed to determine the virtual display size when no explicit size was
provided.
Since the dpi was scaled down accordingly, it is often better to create
a virtual display at the target capture size directly. However, not
everything is rendered according to the virtual display DPI. For
example, a page in Firefox is rendered too big on small virtual
displays. Thus, it makes sense to be able create a virtual display at a
given size, and capture it at a lower resolution with --max-size. This
is now possible using OpenGL filters.
Therefore, change the behavior of --max-size for virtual displays:
- --max-size does not impact --new-display without size argument
anymore (the virtual display size is the main display size);
- it is used to limit the capture size (whether an explicit size is
provided or not).
This new behavior is consistent with main display capture.
Refs #5370 comment <https://github.com/Genymobile/scrcpy/pull/5370#issuecomment-2438944401>
Refs #5370 <https://github.com/Genymobile/scrcpy/pull/5370>
PR #5506 <https://github.com/Genymobile/scrcpy/pull/5506>