Add logging for failing to get monitor capabilities
This commit is contained in:
parent
425f9c3e13
commit
586db85741
@ -7,6 +7,7 @@
|
||||
|
||||
#include <highlevelmonitorconfigurationapi.h>
|
||||
|
||||
#include "get_last_error.hpp"
|
||||
#include "log_tr.hpp"
|
||||
|
||||
Monitor::Monitor(HMONITOR hMonitor, PHYSICAL_MONITOR physicalMonitor)
|
||||
@ -33,7 +34,9 @@ bool Monitor::hasBrightnessCapability() const
|
||||
DWORD colorTemperatures = 0;
|
||||
|
||||
if(!GetMonitorCapabilities(m_physicalMonitor.handle, &monitorCapabilities, &colorTemperatures)) {
|
||||
// TODO: Log error
|
||||
qCritical(ltr("Failed to get capabilities for monitor '0x%1', error: %2")
|
||||
.arg(reinterpret_cast<qulonglong>(m_physicalMonitor.handle), 0, 16)
|
||||
.arg(getLastErrorString()));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user