"Could not" implies that the system tried to disable the option but
encountered an issue or failure.
"Cannot" indicates a rule or restriction, meaning it's not possible to
perform the action at all.
In Java, control messages were parsed using manual buffering, which was
convoluted and error-prone.
Instead, read the socket directly through a DataInputStream and a
BufferedInputStream. Symmetrically, use a DataOutputStream and a
BufferedOutputStream to write messages.
Even if the pointer is a mouse, inject it as a finger unless it is
required to be a mouse, that is:
- when it is a HOVER_MOUSE event, or
- when a secondary button is pressed.
Some apps/games only accept events from a finger/touchscreen, so using a
mouse by default does not work for them.
For simplicity, make this change on the server side just before
event injection (so that the client does not need to know about this
hacky behavior).
Refs 6808288823
Refs c7b1d0ea9aFixes#5162 <https://github.com/Genymobile/scrcpy/issues/5162>
Fixes#5163 <https://github.com/Genymobile/scrcpy/issues/5163>
By default, the audio source is initialized to SC_AUDIO_SOURCE_AUTO, and
is "resolved" only if audio is enabled.
But the server arguments were built assuming that the audio source was
never SC_AUDIO_SOURCE_AUTO (even with audio disabled), causing a crash.
Regression introduced by a10f8cd798.
Automatically switch implicit audio source to "playback" if --audio-dup
is passed.
This allows to run:
scrcpy --audio-dup
without specifying explicitly:
scrcpy --audio-source=playback --audio-dup
PR #5102 <https://github.com/Genymobile/scrcpy/pull/5102>
Add a new method to capture audio playback.
It requires Android 13 (where the Shell app has MODIFY_AUDIO_ROUTING
permission).
The main benefit is that it supports keeping audio playing on the device
(implemented in a further commit).
Fixes#4380 <https://github.com/Genymobile/scrcpy/issues/4380>
PR #5102 <https://github.com/Genymobile/scrcpy/pull/5102>
Co-authored-by: Simon Chan <1330321+yume-chan@users.noreply.github.com>
The MediaRecorder constant should not belong to the AudioSource enum.
This will allow to add a new AudioSource which has no meaningful
MediaRecorder audio source value.
PR #5102 <https://github.com/Genymobile/scrcpy/pull/5102>
Move the implementation to AudioDirectCapture and extract an
AudioCapture interface.
This will allow to provide another AudioCapture implementation.
PR #5102 <https://github.com/Genymobile/scrcpy/pull/5102>
The compatibility depends on the capture constraints, not the encoding.
This will allow to add a new capture implementation with different
constraints.
PR #5102 <https://github.com/Genymobile/scrcpy/pull/5102>
The install_release.sh script is updated one commit after the release
tag, which may be confusing.
For convenience, new lightweight tags have been added (for example
v2.5-install-release) to point to the commit where install_release.sh is
updated.
But these tags interfere with "git describe" to generate pretty
filenames when executing ./release.sh on a development branch, so ignore
them.
Before:
release-v2.5-install-release-17-gc57a0512b
After:
release-v2.5-18-gc57a0512b
Refs #4098 comment <https://github.com/Genymobile/scrcpy/issues/4098#issuecomment-1600332180>
Passing an unknown enum value to convert them to string would return
NULL without any error, possibly causing undefined behavior later.
Add assertions to catch such programming errors early.
Add secondary bindings (Shift+click) for mouse buttons.
In addition to:
--mouse-bind=xxxx
It is now possible to pass a sequence of secondary bindings:
--mouse-bind=xxxx:xxxx
<--> <-->
primary secondary
bindings bindings
If the second sequence is omitted, then it is the same as the first one.
By default, for SDK mouse, primary bindings trigger shortcuts and
secondary bindings forward all clicks.
For AOA and UHID, the default bindings are reversed: all clicks are
forwarded by default, whereas pressing Shift+click trigger shortcuts.
--mouse-bind=bhsn:++++ # default for SDK
--mouse-bind=++++:bhsn # default for AOA and UHID
Refs 035d60cf5d
Refs f5e6b8092aFixes#5055 <https://github.com/Genymobile/scrcpy/issues/5055>
PR #5076 <https://github.com/Genymobile/scrcpy/pull/5076>
The buttons state was tracked by SDL_GetMouseState(), and scrcpy applied
a mask to ignore buttons used for shortcuts.
Instead, track the buttons actually pressed (ignoring shortcuts)
manually, to prepare the introduction of more dynamic mouse shortcuts.
PR #5076 <https://github.com/Genymobile/scrcpy/pull/5076>
For pinch-to-zoom, rotation and tilt simulation, always use a finger
source (instead of a mouse) for both pointers (the real one and the
simulated one).
A "virtual" mouse does not work on all devices (e.g. on Pixel 8).
PR #5076 <https://github.com/Genymobile/scrcpy/pull/5076>