mirror of https://github.com/PCSX2/pcsx2.git
Error: Fix negative formatting of HRESULT
This commit is contained in:
parent
339dc2313b
commit
1881139b0a
|
@ -141,12 +141,13 @@ void Error::SetHResult(std::string_view prefix, long err)
|
||||||
static_cast<DWORD>(std::size(buf)), nullptr);
|
static_cast<DWORD>(std::size(buf)), nullptr);
|
||||||
if (r > 0)
|
if (r > 0)
|
||||||
{
|
{
|
||||||
m_description =
|
m_description = fmt::format("{}HRESULT {:08X}: {}", prefix, static_cast<unsigned>(err),
|
||||||
fmt::format("{}HRESULT {:08X}: {}", prefix, err, StringUtil::WideStringToUTF8String(std::wstring_view(buf, r)));
|
StringUtil::WideStringToUTF8String(std::wstring_view(buf, r)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_description = fmt::format("{}HRESULT {:08X}: <Could not resolve system error ID>", prefix, err);
|
m_description = fmt::format("{}HRESULT {:08X}: <Could not resolve system error ID>", prefix,
|
||||||
|
static_cast<unsigned>(err));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue