diff options
author | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2022-10-16 09:14:52 +0200 |
---|---|---|
committer | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2022-10-16 09:14:52 +0200 |
commit | 5c7eef3756ed2814fdc8e5e42a2ebed489c37405 (patch) | |
tree | e91354f86cbce71e12aec6fe9e03a12436ea50f0 /src | |
parent | Merge pull request #9058 from Docteh/new_transifex_cli (diff) | |
download | yuzu-5c7eef3756ed2814fdc8e5e42a2ebed489c37405.tar yuzu-5c7eef3756ed2814fdc8e5e42a2ebed489c37405.tar.gz yuzu-5c7eef3756ed2814fdc8e5e42a2ebed489c37405.tar.bz2 yuzu-5c7eef3756ed2814fdc8e5e42a2ebed489c37405.tar.lz yuzu-5c7eef3756ed2814fdc8e5e42a2ebed489c37405.tar.xz yuzu-5c7eef3756ed2814fdc8e5e42a2ebed489c37405.tar.zst yuzu-5c7eef3756ed2814fdc8e5e42a2ebed489c37405.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/audio_core/sink/sdl2_sink.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/audio_core/sink/sdl2_sink.cpp b/src/audio_core/sink/sdl2_sink.cpp index f12ebf7fe..dee47cf0e 100644 --- a/src/audio_core/sink/sdl2_sink.cpp +++ b/src/audio_core/sink/sdl2_sink.cpp @@ -230,7 +230,10 @@ 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)); + const char* name = SDL_GetAudioDeviceName(i, 0); + if (name != nullptr) { + device_list.emplace_back(name); + } } return device_list; |