Fix mac os crash on rescan

This commit is contained in:
Qwex
2024-05-02 12:57:13 +00:00
committed by Adam Honse
parent 7ae3ee5e72
commit ad6e83885e

View File

@@ -796,6 +796,13 @@ void ResourceManager::DetectDevices()
UpdateDeviceList();
/*-------------------------------------------------*\
| Initialize HID interface for detection |
\*-------------------------------------------------*/
int hid_status = hid_init();
LOG_INFO("Initializing HID interfaces: %s", ((hid_status == 0) ? "Success" : "Failed"));
/*-------------------------------------------------*\
| Start the device detection thread |
\*-------------------------------------------------*/
@@ -863,13 +870,6 @@ void ResourceManager::DetectDevicesThreadFunction()
\*-------------------------------------------------*/
detector_settings = settings_manager->GetSettings("Detectors");
/*-------------------------------------------------*\
| Initialize HID interface for detection |
\*-------------------------------------------------*/
int hid_status = hid_init();
LOG_INFO("Initializing HID interfaces: %s", ((hid_status == 0) ? "Success" : "Failed"));
/*-------------------------------------------------*\
| Check HID safe mode setting |
\*-------------------------------------------------*/