diff --git a/source/CaptureDeviceSpecific/CypressShared/cypress_shared_libusb_comms.cpp b/source/CaptureDeviceSpecific/CypressShared/cypress_shared_libusb_comms.cpp index 0f6666d..8c30c42 100644 --- a/source/CaptureDeviceSpecific/CypressShared/cypress_shared_libusb_comms.cpp +++ b/source/CaptureDeviceSpecific/CypressShared/cypress_shared_libusb_comms.cpp @@ -4,6 +4,12 @@ #include #include "usb_generic.hpp" +#define CYPRESS_EZ_FX2_VID 0x04B4 +#define CYPRESS_EZ_FX2_PID 0x8613 + +#define CYPRESS_EZ_FX2_BAD_VID_INTRAORAL 0x0547 +#define CYPRESS_EZ_FX2_BAD_PID_INTRAORAL 0x2001 + // Read from ctrl_in int cypress_libusb_ctrl_in(cy_device_device_handlers* handlers, const cy_device_usb_device* usb_device_desc, uint8_t* buf, int length, uint8_t request, uint16_t value, uint16_t index, int* transferred) { int ret = libusb_control_transfer(handlers->usb_handle, 0xC0, request, value, index, buf, length, usb_device_desc->bulk_timeout); @@ -317,6 +323,19 @@ void cypress_libusb_list_devices(std::vector &devices_list, bool* not_supported_elems[j] = true; break; } + #ifdef _WIN32 + // The IntraOral vendor overwrote the Infineon driver in a recent Windows Update... + // This is terrible, and Microsoft needs to fix this asap. + // Prepare a warning, so users can at least understand what is the problem. + // They will need to uninstall the devices and remove the driver, even from hidden devices... :/ + if((device_descriptions[j]->pid == CYPRESS_EZ_FX2_PID) && (device_descriptions[j]->vid == CYPRESS_EZ_FX2_VID)) { + // Keep it like this in case multiple vendors do this in the future. :/ + if((usb_descriptor.idVendor == CYPRESS_EZ_FX2_BAD_VID_INTRAORAL) && (usb_descriptor.idProduct == CYPRESS_EZ_FX2_BAD_PID_INTRAORAL)) { + no_access_elems[j] = true; + ActualConsoleOutTextError("WARNING: IntraOral device detected. Possible driver issue."); + } + } + #endif } } diff --git a/source/devicecapture.cpp b/source/devicecapture.cpp index ce1f4cd..a19d100 100755 --- a/source/devicecapture.cpp +++ b/source/devicecapture.cpp @@ -164,7 +164,14 @@ bool connect(bool print_failed, CaptureData* capture_data, FrontendData* fronten else full_error_part += "VID: " + to_hex_u16(no_access_list[i].vid) + ", PID: " + to_hex_u16(no_access_list[i].pid); } - capture_error_print(print_failed, capture_data, "No device was found\nPossible permission error", "No device was found - Possible permission error" + full_error_part); + #ifdef _WIN32 + std::string base_error_string = "No device was found\nPossible driver issue"; + std::string long_error_string = "No device was found - Possible driver issue" + full_error_part; + #else + std::string base_error_string = "No device was found\nPossible permission error"; + std::string long_error_string = "No device was found - Possible permission error" + full_error_part; + #endif + capture_error_print(print_failed, capture_data, base_error_string, long_error_string); } return false; }