Adding logging notices to ResourceManager to track explicit hid_init() and hid_exit()

This commit is contained in:
Chris 2021-03-27 11:13:12 +11:00 committed by Adam Honse
parent d926754745
commit 067aa4d88a

View file

@ -358,6 +358,13 @@ void ResourceManager::Cleanup()
delete bus;
}
/*-------------------------------------------------*\
| Cleanup HID interface |
\*-------------------------------------------------*/
int hid_status = hid_exit();
LOG_DEBUG("Closing HID interfaces: %s", ((hid_status == 0) ? "Success" : "Failed"));
if(DetectDevicesThread)
{
DetectDevicesThread->join();
@ -448,6 +455,13 @@ void ResourceManager::DetectDevicesThreadFunction()
\*-------------------------------------------------*/
detector_settings = settings_manager->GetSettings("Detectors");
/*-------------------------------------------------*\
| Initialize HID interface for detection |
\*-------------------------------------------------*/
int hid_status = hid_init();
LOG_NOTICE("Initializing HID interfaces: %s", ((hid_status == 0) ? "Success" : "Failed"));
/*-------------------------------------------------*\
| Check HID safe mode setting |
\*-------------------------------------------------*/