mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 22:45:45 +00:00
sdl2_sink: Inline variable init into if condition
Co-authored-by: Mai <mathew1800@gmail.com>
This commit is contained in:
parent
8e23f79384
commit
87b2c9f144
1 changed files with 1 additions and 2 deletions
|
@ -230,8 +230,7 @@ std::vector<std::string> ListSDLSinkDevices(bool capture) {
|
||||||
|
|
||||||
const int device_count = SDL_GetNumAudioDevices(capture);
|
const int device_count = SDL_GetNumAudioDevices(capture);
|
||||||
for (int i = 0; i < device_count; ++i) {
|
for (int i = 0; i < device_count; ++i) {
|
||||||
const char* name = SDL_GetAudioDeviceName(i, capture);
|
if (const char* name = SDL_GetAudioDeviceName(i, capture)) {
|
||||||
if (name != nullptr) {
|
|
||||||
device_list.emplace_back(name);
|
device_list.emplace_back(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue