diff options
| author | Silent <zdanio95@gmail.com> | 2019-08-16 20:36:50 +0200 |
|---|---|---|
| committer | Silent <zdanio95@gmail.com> | 2021-01-12 19:18:48 +0100 |
| commit | 374629ef3069aa92e53fd033d0cb6e7f0fa386c5 (patch) | |
| tree | 1eb9b910774b5555af4dd77cabd7cbb1f427172f /Source/Core/AudioCommon/WASAPIStream.cpp | |
| parent | 7fdd4afd9c9b00ed21ff513592b15a75cfba8c2e (diff) | |
AudioCommon: Make HandleWinAPI handle all success return values properly, not just S_OK
Diffstat (limited to 'Source/Core/AudioCommon/WASAPIStream.cpp')
| -rw-r--r-- | Source/Core/AudioCommon/WASAPIStream.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/AudioCommon/WASAPIStream.cpp b/Source/Core/AudioCommon/WASAPIStream.cpp index 6e6cd1950a..d1f3e788b1 100644 --- a/Source/Core/AudioCommon/WASAPIStream.cpp +++ b/Source/Core/AudioCommon/WASAPIStream.cpp @@ -62,7 +62,7 @@ bool WASAPIStream::isValid() static bool HandleWinAPI(std::string_view message, HRESULT result) { - if (result != S_OK) + if (FAILED(result)) { _com_error err(result); 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); } - return result == S_OK; + return SUCCEEDED(result); } std::vector<std::string> WASAPIStream::GetAvailableDevices() |
