Fix some logging mistake

This commit is contained in:
Alex 2021-07-05 23:23:30 +02:00 committed by Adam Honse
parent ef36664ef2
commit 4c41a8834d
2 changed files with 11 additions and 8 deletions

View file

@ -232,14 +232,17 @@ void LogManager::_append(const char* filename, int line, unsigned int level, con
/*-------------------------------------------------*\ /*-------------------------------------------------*\
| If the message level is LL_WARNING or lower, add | | If the message level is LL_WARNING or lower, add |
| it to the error queue | | it to the error queue |
| |
| Commented out - It is causing OpenRGB to crash |
| according to #1537 |
\*-------------------------------------------------*/ \*-------------------------------------------------*/
if(level <= LL_WARNING) //if(level <= LL_WARNING)
{ //{
for(size_t idx = 0; idx < error_callbacks.size(); ++idx) // for(size_t idx = 0; idx < error_callbacks.size(); ++idx)
{ // {
error_callbacks[idx].first(error_callbacks[idx].second, mes); // error_callbacks[idx].first(error_callbacks[idx].second, mes);
} // }
} //}
} }
void LogManager::append(const char* filename, int line, unsigned int level, const char* fmt, ...) void LogManager::append(const char* filename, int line, unsigned int level, const char* fmt, ...)

View file

@ -899,7 +899,7 @@ void ResourceManager::DetectDevicesThreadFunction()
{ {
const char* manu_name = wchar_to_char(current_hid_device->manufacturer_string); const char* manu_name = wchar_to_char(current_hid_device->manufacturer_string);
const char* prod_name = wchar_to_char(current_hid_device->product_string); const char* prod_name = wchar_to_char(current_hid_device->product_string);
LOG_DEBUG("[%04X:%04X U=%3X P=0x%04X I=%d] %-25s - %s", current_hid_device->vendor_id, current_hid_device->product_id, current_hid_device->usage, current_hid_device->usage_page, current_hid_device->interface_number, manu_name, prod_name); LOG_DEBUG("[%04X:%04X U=%04X P=0x%04X I=%d] %-25s - %s", current_hid_device->vendor_id, current_hid_device->product_id, current_hid_device->usage, current_hid_device->usage_page, current_hid_device->interface_number, manu_name, prod_name);
} }
detection_string = ""; detection_string = "";
DetectionProgressChanged(); DetectionProgressChanged();