(WASAPI) Cleanup for audio device selection

This commit is contained in:
twinaphex 2019-07-26 17:19:49 +02:00
parent b5d11db53b
commit 86728ddbf2

View File

@ -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))