From ad6e83885ee010f7f50588ac95c59bbde0774268 Mon Sep 17 00:00:00 2001 From: Qwex Date: Thu, 2 May 2024 12:57:13 +0000 Subject: [PATCH] Fix mac os crash on rescan --- ResourceManager.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ResourceManager.cpp b/ResourceManager.cpp index 46f527cb..bbe2bfe0 100644 --- a/ResourceManager.cpp +++ b/ResourceManager.cpp @@ -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 | \*-------------------------------------------------*/