Mention that the device must be plugged via USB before configuring
TCP/IP connections.
It wasn't obvious that the device should be first plugged before running
scrcpy wirelessly, especially to those who aren't very familiar with
adb.
Note from committer: add this new step with index 0 to make the diff
readable, the next commit will renumber all the steps.
PR #1303 <https://github.com/Genymobile/scrcpy/pull/1303>
Signed-off-by: Romain Vimont <rom@rom1v.com>
For simplicity, the parsing of `adb devices -l` output is performed in a
single pass on the whole output.
This output was limited to 4096 bytes. Since there are about 100 chars
per device line, this limited the number of connected devices to ~40.
Increase to 65536 bytes to avoid a limitation in practice.
PR #3035 <https://github.com/Genymobile/scrcpy/pull/3035>
The files in data/ are specific to the client app (not the server).
This also avoids to reference the parent directory (../) from
app/meson.build.
Refs 8d583d36e259ba7f5f21d7a703cca73184200aa9
All adb commands are executed with an "interruptor", so that they can be
interrupted on Ctrl+C.
Make this interruptor optional, so that we could call "adb kill-server"
in OTG mode. This command always returns almost immediately anyway.
Ideally, we should make all blocking calls interruptible (including
libusb calls, by using the asynchronous API), but it's a lot of work,
and in practice it works well enough.
PR #3011 <https://github.com/Genymobile/scrcpy/pull/3011>
USB device disconnection is detected via a hotplug callback when it is
supported.
In addition, report disconnection on libusb calls returning
LIBUSB_ERROR_NO_DEVICE or LIBUSB_ERROR_NOT_FOUND. This allows to detect
disconnection after a libusb call when hotplug is not available.
PR #3011 <https://github.com/Genymobile/scrcpy/pull/3011>
Using the screen instance or not in these functions is an implementation
detail. Further changes will require the screen instance.
Refs 7848a387c8281cb156f0e0da6bbbb05cda31db22
PR #3031 <https://github.com/Genymobile/scrcpy/pull/3031>
The value of sc_tick_now() has microsecond precision, but
sc_cond_timedwait() has only millisecond precision.
To guarantee that sc_tick_now() >= deadline when sc_cond_timedwait()
returns due to timeout, round up to the next millisecond.
This avoids to call a non-blocking sc_cond_timedwait() in a loop for no
reason until a target deadline during up to 1 millisecond.
Refs 682a6911735cb8f6dccd9653ce30b72f267235c6
The type uint32_t is not sufficient to store the result of
sc_tick_now().
As a consequence, the FPS counter entered a live loop and caused a lock
starvation (deadlock in practice).
Refs ec871dd3f596a8183e37982821645ac5a5791fe0
Refs 682a6911735cb8f6dccd9653ce30b72f267235c6
A special PTS value was used to encode a config packet.
To prepare for adding more flags, use the most significant bits of the
PTS field to store flags.
The relative mouse mode is tracked by SDL, and accessible via
SDL_GetRelativeMouseMode().
This is more robust in case SDL changes the relative mouse mode on its
own.
If sc_usb_connect() failed, then the sc_usb_device was never destroyed.
The assignment was mistakenly removed by commit
61969aeb80093d0777c7716a61698cbdaf9ddd71.
The prebuilt dependencies are specific to the client app (not the
server).
This also avoids to reference the parent directory (../) from
app/meson.build.