Skip to content

Display and control your Android device

Rename function to destroy a list of USB devices

Romain Vimont0eadf95a3e83
diff --git a/app/src/scrcpy.c b/app/src/scrcpy.c
index dc4ac25a..92159bba 100644
--- a/app/src/scrcpy.c
+++ b/app/src/scrcpy.c
@@ -442,7 +442,7 @@ scrcpy(struct scrcpy_options *options) {
if (count > 1) {
LOGE("Multiple (%d) devices with serial %s", (int) count, serial);
- sc_usb_device_destroy_all(usb_devices, count);
+ sc_usb_devices_destroy_all(usb_devices, count);
sc_usb_destroy(&s->usb);
sc_acksync_destroy(&s->acksync);
goto aoa_hid_end;
diff --git a/app/src/usb/scrcpy_otg.c b/app/src/usb/scrcpy_otg.c
index e39ab27a..34c16ce1 100644
--- a/app/src/usb/scrcpy_otg.c
+++ b/app/src/usb/scrcpy_otg.c
@@ -115,7 +115,7 @@ scrcpy_otg(struct scrcpy_options *options) {
if (!serial) {
LOGE("Specify the device via -s or --serial");
}
- sc_usb_device_destroy_all(usb_devices, count);
+ sc_usb_devices_destroy_all(usb_devices, count);
goto end;
}
usb_device_initialized = true;
diff --git a/app/src/usb/usb.c b/app/src/usb/usb.c
index f2dab658..d705f647 100644
--- a/app/src/usb/usb.c
+++ b/app/src/usb/usb.c
@@ -79,7 +79,7 @@ sc_usb_device_destroy(struct sc_usb_device *usb_device) {
}
void
-sc_usb_device_destroy_all(struct sc_usb_device *usb_devices, size_t count) {
+sc_usb_devices_destroy_all(struct sc_usb_device *usb_devices, size_t count) {
for (size_t i = 0; i < count; ++i) {
sc_usb_device_destroy(&usb_devices[i]);
}
diff --git a/app/src/usb/usb.h b/app/src/usb/usb.h
index eda7c2f9..a8810b90 100644
--- a/app/src/usb/usb.h
+++ b/app/src/usb/usb.h
@@ -41,7 +41,7 @@ void
sc_usb_device_destroy(struct sc_usb_device *usb_device);
void
-sc_usb_device_destroy_all(struct sc_usb_device *usb_devices, size_t count);
+sc_usb_devices_destroy_all(struct sc_usb_device *usb_devices, size_t count);
bool
sc_usb_init(struct sc_usb *usb);