diff options
| author | 2022-10-16 03:15:54 -0400 | |
|---|---|---|
| committer | 2022-10-16 03:15:54 -0400 | |
| commit | 9fe077635e00aba362034a694c5d1a701abc288a (patch) | |
| tree | a6f828773944376034328a58bbcd4efb392f36bd | |
| parent | sdl2_sink: Check for null string when loading SDL audio devices (diff) | |
| download | yuzu-9fe077635e00aba362034a694c5d1a701abc288a.tar.gz yuzu-9fe077635e00aba362034a694c5d1a701abc288a.tar.xz yuzu-9fe077635e00aba362034a694c5d1a701abc288a.zip | |
sdl2_sink: Distinguish between capture and non-capture device names
The function prototype appears to care whether we are loading capture
devices or not, and SDL_GetAudioDeviceName has a parameter to use it,
but for some reason it isn't.
This puts `capture` where it goes.
| -rw-r--r-- | src/audio_core/sink/sdl2_sink.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/audio_core/sink/sdl2_sink.cpp b/src/audio_core/sink/sdl2_sink.cpp index dee47cf0e..cc13c6254 100644 --- a/src/audio_core/sink/sdl2_sink.cpp +++ b/src/audio_core/sink/sdl2_sink.cpp | |||
| @@ -230,7 +230,7 @@ std::vector<std::string> ListSDLSinkDevices(bool capture) { | |||
| 230 | 230 | ||
| 231 | const int device_count = SDL_GetNumAudioDevices(capture); | 231 | const int device_count = SDL_GetNumAudioDevices(capture); |
| 232 | for (int i = 0; i < device_count; ++i) { | 232 | for (int i = 0; i < device_count; ++i) { |
| 233 | const char* name = SDL_GetAudioDeviceName(i, 0); | 233 | const char* name = SDL_GetAudioDeviceName(i, capture); |
| 234 | if (name != nullptr) { | 234 | if (name != nullptr) { |
| 235 | device_list.emplace_back(name); | 235 | device_list.emplace_back(name); |
| 236 | } | 236 | } |