mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-10-04 15:18:42 +00:00
Expose function to test if a serial is TCP/IP
In practice, it just tests if the serial contains a ':', which is sufficient to distinguish ip:port from a real USB serial. PR #3005 <https://github.com/Genymobile/scrcpy/pull/3005>
This commit is contained in:
parent
4389de1c23
commit
02d46b2262
3 changed files with 15 additions and 4 deletions
|
@ -482,3 +482,8 @@ sc_adb_get_device_ip(struct sc_intr *intr, const char *serial, unsigned flags) {
|
|||
|
||||
return sc_adb_parse_device_ip_from_output(buf);
|
||||
}
|
||||
|
||||
bool
|
||||
sc_adb_is_serial_tcpip(const char *serial) {
|
||||
return strchr(serial, ':');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue