From 86728ddbf2b1e9c733cde166af9e33b3def82f6b Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 26 Jul 2019 17:19:49 +0200 Subject: [PATCH] (WASAPI) Cleanup for audio device selection --- audio/drivers/wasapi.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/audio/drivers/wasapi.c b/audio/drivers/wasapi.c index cbd34371cf..2e73fd38c1 100644 --- a/audio/drivers/wasapi.c +++ b/audio/drivers/wasapi.c @@ -95,18 +95,14 @@ static IMMDevice *wasapi_init_device(const char *id) idx_found = strtoul(id, NULL, 0); RARCH_LOG("[WASAPI]: Fallback, device index is a single number index instead: %d.\n", idx_found); - if (idx_found != -1) - { - if (idx_found < (int32_t)list->size) - { - RARCH_LOG("[WASAPI]: Corresponding name: %s\n", list->elems[idx_found].data); - } - } } } string_list_free(list); } + if (idx_found == -1) + idx_found = 0; + hr = _IMMDeviceEnumerator_EnumAudioEndpoints(enumerator, eRender, DEVICE_STATE_ACTIVE, &collection); if (FAILED(hr))