mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-03-10 19:47:40 +01:00
AudioCommon: Make HandleWinAPI handle all success return values properly, not just S_OK
This commit is contained in:
parent
7fdd4afd9c
commit
374629ef30
@ -62,7 +62,7 @@ bool WASAPIStream::isValid()
|
|||||||
|
|
||||||
static bool HandleWinAPI(std::string_view message, HRESULT result)
|
static bool HandleWinAPI(std::string_view message, HRESULT result)
|
||||||
{
|
{
|
||||||
if (result != S_OK)
|
if (FAILED(result))
|
||||||
{
|
{
|
||||||
_com_error err(result);
|
_com_error err(result);
|
||||||
std::string error = TStrToUTF8(err.ErrorMessage());
|
std::string error = TStrToUTF8(err.ErrorMessage());
|
||||||
@ -77,7 +77,7 @@ static bool HandleWinAPI(std::string_view message, HRESULT result)
|
|||||||
ERROR_LOG_FMT(AUDIO, "WASAPI: {}: {}", message, error);
|
ERROR_LOG_FMT(AUDIO, "WASAPI: {}: {}", message, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result == S_OK;
|
return SUCCEEDED(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::string> WASAPIStream::GetAvailableDevices()
|
std::vector<std::string> WASAPIStream::GetAvailableDevices()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user