mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-12-16 04:09:39 +00:00
WindowsDevice: Silence missing property log spam
Don't log a warning in GetPropertyHelper when the property isn't present. The function returns an optional, so any callers that want to log a warning when nullopt is returned can do so themselves. This prevents plugged-in devices (an Xbox One controller in my case) from spamming the message "W[COMMON]: CM_Get_DevNode_Property returned: 37" twice per second (that value being CR_NO_SUCH_VALUE).
This commit is contained in:
parent
1067754d21
commit
4e359cf1c5
@ -47,7 +47,8 @@ std::optional<std::wstring> GetPropertyHelper(auto function, auto dev,
|
||||
if (const auto result = function(dev, requested_property, &type, nullptr, &buffer_size, 0);
|
||||
result != CR_SUCCESS && result != CR_BUFFER_SMALL)
|
||||
{
|
||||
WARN_LOG_FMT(COMMON, "CM_Get_DevNode_Property returned: {}", result);
|
||||
if (result != CR_NO_SUCH_VALUE)
|
||||
WARN_LOG_FMT(COMMON, "CM_Get_DevNode_Property returned: {}", result);
|
||||
return std::nullopt;
|
||||
}
|
||||
if (type != expected_type)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user