diff options
| author | Jordan Woyak <jordan.woyak@gmail.com> | 2025-10-14 22:32:12 -0500 |
|---|---|---|
| committer | Jordan Woyak <jordan.woyak@gmail.com> | 2025-11-05 04:05:36 -0600 |
| commit | 28be9dc64f50bd5102a65495627830c2c258e54c (patch) | |
| tree | fe4d16ff751a202d607dccefa4f8ae4ed70f2df8 /Source/Core/Common/WindowsDevice.cpp | |
| parent | 2fb1fdfb16d5e45888fc327f850cd3d78330ce96 (diff) | |
WindowsDevice: Remove GetDeviceProperty function in favor of the CfgMgr32 versions. SetupAPI seems to be no longer recommended.
Diffstat (limited to 'Source/Core/Common/WindowsDevice.cpp')
| -rw-r--r-- | Source/Core/Common/WindowsDevice.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/Source/Core/Common/WindowsDevice.cpp b/Source/Core/Common/WindowsDevice.cpp index 9102f24b93..4bbd213774 100644 --- a/Source/Core/Common/WindowsDevice.cpp +++ b/Source/Core/Common/WindowsDevice.cpp @@ -14,29 +14,6 @@ namespace Common { -std::wstring GetDeviceProperty(const HDEVINFO& device_info, const PSP_DEVINFO_DATA device_data, - const DEVPROPKEY* requested_property) -{ - DWORD required_size = 0; - DEVPROPTYPE device_property_type; - BOOL result; - - result = SetupDiGetDeviceProperty(device_info, device_data, requested_property, - &device_property_type, nullptr, 0, &required_size, 0); - if (!result && GetLastError() != ERROR_INSUFFICIENT_BUFFER) - return std::wstring(); - - std::vector<TCHAR> unicode_buffer(required_size / sizeof(TCHAR)); - - result = SetupDiGetDeviceProperty( - device_info, device_data, requested_property, &device_property_type, - reinterpret_cast<PBYTE>(unicode_buffer.data()), required_size, nullptr, 0); - if (!result) - return std::wstring(); - - return std::wstring(unicode_buffer.data()); -} - std::optional<std::wstring> GetPropertyHelper(auto function, auto dev, const DEVPROPKEY* requested_property, DEVPROPTYPE expected_type) |
