From c338f9e2a1a8a0a96b41f0927f60ac7ff530b3a9 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Mon, 23 Jan 2023 06:09:01 -0800 Subject: [PATCH] windows: replace comdef dependency with winrt --- Source/Core/AudioCommon/WASAPIStream.cpp | 1 - Source/Core/Common/HRWrap.cpp | 8 +++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Source/Core/AudioCommon/WASAPIStream.cpp b/Source/Core/AudioCommon/WASAPIStream.cpp index db111a64dd..dddc1f6ebb 100644 --- a/Source/Core/AudioCommon/WASAPIStream.cpp +++ b/Source/Core/AudioCommon/WASAPIStream.cpp @@ -7,7 +7,6 @@ // clang-format off #include -#include #include #include #include diff --git a/Source/Core/Common/HRWrap.cpp b/Source/Core/Common/HRWrap.cpp index cfbd0e4a87..d815078fec 100644 --- a/Source/Core/Common/HRWrap.cpp +++ b/Source/Core/Common/HRWrap.cpp @@ -3,15 +3,13 @@ #include "HRWrap.h" -#include -#include "Common/StringUtil.h" +#include namespace Common { std::string GetHResultMessage(HRESULT hr) { - // See https://stackoverflow.com/a/7008111 - _com_error err(hr); - return TStrToUTF8(err.ErrorMessage()); + auto err = winrt::hresult_error(hr); + return winrt::to_string(err.message()); } } // namespace Common