mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
Merge pull request #11475 from shuffle2/comdef
windows: replace comdef dependency with winrt
This commit is contained in:
commit
a8a4b9c6d0
@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
#include <Audioclient.h>
|
#include <Audioclient.h>
|
||||||
#include <comdef.h>
|
|
||||||
#include <mmdeviceapi.h>
|
#include <mmdeviceapi.h>
|
||||||
#include <devpkey.h>
|
#include <devpkey.h>
|
||||||
#include <functiondiscoverykeys_devpkey.h>
|
#include <functiondiscoverykeys_devpkey.h>
|
||||||
|
@ -3,15 +3,13 @@
|
|||||||
|
|
||||||
#include "HRWrap.h"
|
#include "HRWrap.h"
|
||||||
|
|
||||||
#include <comdef.h>
|
#include <winrt/base.h>
|
||||||
#include "Common/StringUtil.h"
|
|
||||||
|
|
||||||
namespace Common
|
namespace Common
|
||||||
{
|
{
|
||||||
std::string GetHResultMessage(HRESULT hr)
|
std::string GetHResultMessage(HRESULT hr)
|
||||||
{
|
{
|
||||||
// See https://stackoverflow.com/a/7008111
|
auto err = winrt::hresult_error(hr);
|
||||||
_com_error err(hr);
|
return winrt::to_string(err.message());
|
||||||
return TStrToUTF8(err.ErrorMessage());
|
|
||||||
}
|
}
|
||||||
} // namespace Common
|
} // namespace Common
|
||||||
|
Loading…
x
Reference in New Issue
Block a user