Romain Vimont
25296ae167
Kill adb daemon in OTG mode on Windows
...
On Windows, it is not possible to open a USB device from several
process, so HID events may only work if no adb daemon is running.
PR #3011 <https://github.com/Genymobile/scrcpy/pull/3011 >
2022-02-20 17:39:39 +01:00
Romain Vimont
06243e7c3c
Avoid PRIx16 printf format on Windows
...
Convert uint16_t to unsigned to avoid using PRIx16, which may not exist
on Windows.
PR #3011 <https://github.com/Genymobile/scrcpy/pull/3011 >
2022-02-20 17:39:04 +01:00
Romain Vimont
43ae418752
Fix USB device leak on connection error
...
If sc_usb_connect() failed, then the sc_usb_device was never destroyed.
The assignment was mistakenly removed by commit
61969aeb80
.
2022-02-10 08:47:39 +01:00
Romain Vimont
61969aeb80
Expose simple API to select a single USB device
...
The caller just wants a single device. Handle all cases and error
messages internally.
PR #3005 <https://github.com/Genymobile/scrcpy/pull/3005 >
2022-02-09 09:55:25 +01:00
Romain Vimont
0eadf95a3e
Rename function to destroy a list of USB devices
...
Rename from "usb_device_" to "usb_devices_".
PR #3005 <https://github.com/Genymobile/scrcpy/pull/3005 >
2022-02-09 09:53:19 +01:00
Romain Vimont
61b6324ee9
Remove LOGC()
...
It is not clear when to use LOGC() rather than LOGE(). Always use
LOGE().
Moreover, enum sc_log_level has no "critical" log level.
2022-02-09 09:52:15 +01:00
Romain Vimont
5508c635cb
Enable mouse focus clickthrough in OTG mode
...
A single click on the window must both give focus and capture the mouse.
PR #2974 <https://github.com/Genymobile/scrcpy/pull/2974 >
2022-01-27 23:36:30 +01:00
Romain Vimont
ea68a003a2
Make HID keyboard and mouse optional in OTG mode
...
Allow to only enable HID keyboard or HID mouse:
scrcpy --otg -K # keyboard only
scrcpy --otg -M # mouse only
scrcpy --otg -KM # keyboard and mouse
scrcpy --otg # keyboard and mouse
PR #2974 <https://github.com/Genymobile/scrcpy/pull/2974 >
2022-01-27 23:36:27 +01:00
Romain Vimont
91418c79ab
Add OTG mode
...
Add an option --otg to run scrcpy with only physical keyboard and mouse
simulation (HID over AOA), without mirroring and without requiring adb.
To avoid adding complexity into the scrcpy initialization and screen
implementation, OTG mode is implemented totally separately, with a
separate window.
PR #2974 <https://github.com/Genymobile/scrcpy/pull/2974 >
2022-01-27 23:36:23 +01:00