From 4e359cf1c5f42fb394e0035f2aad517f2c89f014 Mon Sep 17 00:00:00 2001 From: Dentomologist Date: Mon, 13 Oct 2025 11:55:12 -0700 Subject: [PATCH] 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). --- Source/Core/Common/WindowsDevice.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/Common/WindowsDevice.cpp b/Source/Core/Common/WindowsDevice.cpp index 770aa3861a..405ea5e25b 100644 --- a/Source/Core/Common/WindowsDevice.cpp +++ b/Source/Core/Common/WindowsDevice.cpp @@ -47,7 +47,8 @@ std::optional 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)