summaryrefslogtreecommitdiffstats
path: root/src/audio_core
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2022-10-17 08:56:38 +0200
committerGitHub <noreply@github.com>2022-10-17 08:56:38 +0200
commitf107e58fde1e52bc33fe3e1104b0fa9e3648c77f (patch)
treed28a28a893c7eaf3b7358daaf9af0d08875702c7 /src/audio_core
parentMerge pull request #9058 from Docteh/new_transifex_cli (diff)
parentsdl2_sink: Inline variable init into if condition (diff)
downloadyuzu-f107e58fde1e52bc33fe3e1104b0fa9e3648c77f.tar
yuzu-f107e58fde1e52bc33fe3e1104b0fa9e3648c77f.tar.gz
yuzu-f107e58fde1e52bc33fe3e1104b0fa9e3648c77f.tar.bz2
yuzu-f107e58fde1e52bc33fe3e1104b0fa9e3648c77f.tar.lz
yuzu-f107e58fde1e52bc33fe3e1104b0fa9e3648c77f.tar.xz
yuzu-f107e58fde1e52bc33fe3e1104b0fa9e3648c77f.tar.zst
yuzu-f107e58fde1e52bc33fe3e1104b0fa9e3648c77f.zip
Diffstat (limited to '')
-rw-r--r--src/audio_core/sink/sdl2_sink.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/audio_core/sink/sdl2_sink.cpp b/src/audio_core/sink/sdl2_sink.cpp
index f12ebf7fe..c138dc628 100644
--- a/src/audio_core/sink/sdl2_sink.cpp
+++ b/src/audio_core/sink/sdl2_sink.cpp
@@ -230,7 +230,9 @@ std::vector<std::string> ListSDLSinkDevices(bool capture) {
const int device_count = SDL_GetNumAudioDevices(capture);
for (int i = 0; i < device_count; ++i) {
- device_list.emplace_back(SDL_GetAudioDeviceName(i, 0));
+ if (const char* name = SDL_GetAudioDeviceName(i, capture)) {
+ device_list.emplace_back(name);
+ }
}
return device_list;