#if defined(USB_CONTROLLER) #include "usbcontroller.h" #ifdef Q_OS_WIN #pragma comment (lib, "Setupapi.lib") #endif #include #include "logcategories.h" usbController::usbController() { // As this is run in it's own thread, don't do anything in the constructor qInfo(logUsbControl()) << "Starting usbController()"; loadCommands(); loadButtons(); loadKnobs(); } usbController::~usbController() { qInfo(logUsbControl) << "Ending usbController()"; for (USBDEVICE &dev: usbDevices) { if (dev.handle) { programOverlay(dev.path, 60, "Goodbye from wfview"); if (dev.usbDevice == RC28) { ledControl(false, 3); } emit removeDevice(&dev); hid_close(dev.handle); } } hid_exit(); #if (QT_VERSION < QT_VERSION_CHECK(6,0,0)) if (gamepad != Q_NULLPTR) { delete gamepad; gamepad = Q_NULLPTR; } #endif } void usbController::init(QMutex* mut,usbMap* prefs ,QVector