From f86df817f908a5fd5e7e6eaf9565ec76b5ead092 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Tue, 8 Feb 2022 21:28:55 +0100 Subject: [PATCH] Print libusb version on --version --- app/src/version.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/src/version.c b/app/src/version.c index 40688aae..90ea3334 100644 --- a/app/src/version.c +++ b/app/src/version.c @@ -6,6 +6,9 @@ #ifdef HAVE_V4L2 # include #endif +#ifdef HAVE_USB +# include +#endif void scrcpy_print_version(void) { @@ -54,4 +57,11 @@ scrcpy_print_version(void) { AV_VERSION_MINOR(avdevice), AV_VERSION_MICRO(avdevice)); #endif + +#ifdef HAVE_USB + const struct libusb_version *usb = libusb_get_version(); + // The compiled version may not be known + printf(" - libusb: - / %u.%u.%u\n", + (unsigned) usb->major, (unsigned) usb->minor, (unsigned) usb->micro); +#endif }