| 1 | // Copyright 2021 Dolphin Emulator Project |
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | |
| 4 | #include "HRWrap.h" |
| 5 | |
| 6 | namespace Common |
| 7 | { |
| 8 | std::string GetHResultMessage(HRESULT hr) |
| 9 | { |
| 10 | auto err = winrt::hresult_error(hr); |
| 11 | return winrt::to_string(err.message()); |
| 12 | } |
| 13 | std::string GetHResultMessage(const winrt::hresult& hr) |
| 14 | { |
| 15 | return GetHResultMessage(hr.value); |
| 16 | } |
| 17 | } // namespace Common |