Skip to content

Commit afb70a0

Browse files
Tpimpfpoussin
authored andcommitted
Fixing build issue on windows related to platform macros
Fixing issue with #endifs for IAD code for windows
1 parent 8261fb2 commit afb70a0

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/usb/qusb.cpp

+4-5
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,10 @@ int QUsb::xusb(const Id &id, const Config &config)
720720
}
721721
}
722722

723-
#ifdef QUSB_READ_DESCRIPTORS
723+
724+
725+
#ifdef Q_OS_WIN
726+
// Read the OS String Descriptor
724727
char string[128];
725728
qDebug("\nReading string descriptors:\n");
726729
if (libusb_get_string_descriptor_ascii(handle, dev_desc.iManufacturer, (unsigned char*)string, sizeof(string)) > 0) {
@@ -732,10 +735,6 @@ int QUsb::xusb(const Id &id, const Config &config)
732735
if (libusb_get_string_descriptor_ascii(handle, dev_desc.iSerialNumber, (unsigned char*)string, sizeof(string)) > 0) {
733736
qDebug(" String (0x%02X): \"%s\"\n", dev_desc.iSerialNumber, string);
734737
}
735-
#endif
736-
737-
#ifdef Q_OS_WIN
738-
// Read the OS String Descriptor
739738
r = libusb_get_string_descriptor(handle, MS_OS_DESC_STRING_INDEX, 0, (unsigned char*)string, MS_OS_DESC_STRING_LENGTH);
740739
int first_iface = -1;
741740
if (nb_ifaces > 0)

0 commit comments

Comments
 (0)