summaryrefslogtreecommitdiff
path: root/Source/Core/AudioCommon/WASAPIStream.cpp
diff options
context:
space:
mode:
authorDentomologist <dentomologist@gmail.com>2026-03-21 13:37:22 -0700
committerDentomologist <dentomologist@gmail.com>2026-03-21 15:07:42 -0700
commit6b2a8eff15bffc1dc6831d236032c751f426eb13 (patch)
tree0ae572b961d40cbc6e9204432887392c0294dc84 /Source/Core/AudioCommon/WASAPIStream.cpp
parent0e92a147036fa9ab8a953b40723f43142c2e5d7b (diff)
AudioPane: Fix WASAPI default device combo selection
Set the default value of `Config::MAIN_WASAPI_DEVICE` to `default` instead of `Default`. This fixes an issue where `AudioPane`'s `Output Device` combo would be blank if `WASAPI` was selected and the user had never changed the value of `Output Device`. We don't have to worry about backward compatibility with users who have `Default` in their config because config values aren't written unless they've been changed at some point from the default, and the combo has always saved `default` instead of `Default`. Audio still worked during emulation in this situation because the fallback for an unrecognized device name is the default device. To help prevent similar situations in the future references to `MAIN_WASAPI_DEVICE`'s default value now call `GetDefaultValue` instead of hardcoding the expected default, or use the new helper function `Config::IsDefaultValue`.
Diffstat (limited to 'Source/Core/AudioCommon/WASAPIStream.cpp')
-rw-r--r--Source/Core/AudioCommon/WASAPIStream.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/AudioCommon/WASAPIStream.cpp b/Source/Core/AudioCommon/WASAPIStream.cpp
index afd5531ae8..9cbf915e82 100644
--- a/Source/Core/AudioCommon/WASAPIStream.cpp
+++ b/Source/Core/AudioCommon/WASAPIStream.cpp
@@ -176,7 +176,7 @@ bool WASAPIStream::SetRunning(bool running)
HRESULT result;
- if (Config::Get(Config::MAIN_WASAPI_DEVICE) == "default")
+ if (Config::IsDefaultValue(Config::MAIN_WASAPI_DEVICE))
{
result = m_enumerator->GetDefaultAudioEndpoint(eRender, eConsole, &device);
}