Split USB initialization and connection

This will allow to execute other USB calls (retrieving the device list
for example) before connecting to the selected device.

PR #2974 <https://github.com/Genymobile/scrcpy/pull/2974>
This commit is contained in:
Romain Vimont
2022-01-25 19:10:23 +01:00
parent 2114f48185
commit bbef426a4b
3 changed files with 33 additions and 13 deletions

View File

@@ -12,9 +12,15 @@ struct sc_usb {
};
bool
sc_usb_init(struct sc_usb *usb, const char *serial);
sc_usb_init(struct sc_usb *usb);
void
sc_usb_destroy(struct sc_usb *usb);
bool
sc_usb_connect(struct sc_usb *usb, const char *serial);
void
sc_usb_disconnect(struct sc_usb *usb);
#endif