Skip to content

Commit

Permalink
Enable access to the device info outside the if statements
Browse files Browse the repository at this point in the history
  • Loading branch information
peternewman committed Feb 3, 2024
1 parent 949ce94 commit 0fac6e8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions plugins/usbdmx/EuroliteProFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ bool EuroliteProFactory::DeviceAdded(
libusb_device *usb_device,
const struct libusb_device_descriptor &descriptor) {
bool is_mk2 = false;
LibUsbAdaptor::DeviceInformation info;

// Eurolite USB-DMX512-PRO?
if (descriptor.idVendor == VENDOR_ID && descriptor.idProduct == PRODUCT_ID) {
OLA_INFO << "Found a new Eurolite USB-DMX512-PRO device";
LibUsbAdaptor::DeviceInformation info;
if (!m_adaptor->GetDeviceInfo(usb_device, descriptor, &info)) {
return false;
}
Expand All @@ -112,7 +112,6 @@ bool EuroliteProFactory::DeviceAdded(
// Eurolite USB-DMX512-PRO MK2?
} else if (descriptor.idVendor == VENDOR_ID_MK2 &&
descriptor.idProduct == PRODUCT_ID_MK2) {
LibUsbAdaptor::DeviceInformation info;
if (!m_adaptor->GetDeviceInfo(usb_device, descriptor, &info)) {
return false;
}
Expand Down

0 comments on commit 0fac6e8

Please sign in to comment.