diff options
author | Chris Robinson <[email protected]> | 2015-10-28 18:10:12 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2015-10-28 18:10:12 -0700 |
commit | bd73cdab0df049ece41f20ff6a83465b0bfb4e0a (patch) | |
tree | 4687c681e1a5273700c5f6f50704aec7871c4877 /Alc/ALc.c | |
parent | 59c6fc966dbcb70ebb99a5d25b7db41085b34e72 (diff) |
Pass the appropriate BackendInfo explicitly to ProbeDevices
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r-- | Alc/ALc.c | 30 |
1 files changed, 9 insertions, 21 deletions
@@ -1223,39 +1223,27 @@ static void alc_deinit(void) /************************************************ * Device enumeration ************************************************/ -static void ProbeDevices(al_string *list, enum DevProbe type) +static void ProbeDevices(al_string *list, struct BackendInfo *backendinfo, enum DevProbe type) { DO_INITCONFIG(); LockLists(); al_string_clear(list); - if(type == ALL_DEVICE_PROBE && (PlaybackBackend.Probe || PlaybackBackend.getFactory)) - { - if(!PlaybackBackend.getFactory) - PlaybackBackend.Probe(type); - else - { - ALCbackendFactory *factory = PlaybackBackend.getFactory(); - V(factory,probe)(type); - } - } - else if(type == CAPTURE_DEVICE_PROBE && (CaptureBackend.Probe || CaptureBackend.getFactory)) + if(!backendinfo->getFactory) + backendinfo->Probe(type); + else { - if(!CaptureBackend.getFactory) - CaptureBackend.Probe(type); - else - { - ALCbackendFactory *factory = CaptureBackend.getFactory(); - V(factory,probe)(type); - } + ALCbackendFactory *factory = backendinfo->getFactory(); + V(factory,probe)(type); } + UnlockLists(); } static void ProbeAllDevicesList(void) -{ ProbeDevices(&alcAllDevicesList, ALL_DEVICE_PROBE); } +{ ProbeDevices(&alcAllDevicesList, &PlaybackBackend, ALL_DEVICE_PROBE); } static void ProbeCaptureDeviceList(void) -{ ProbeDevices(&alcCaptureDeviceList, CAPTURE_DEVICE_PROBE); } +{ ProbeDevices(&alcCaptureDeviceList, &CaptureBackend, CAPTURE_DEVICE_PROBE); } static void AppendDevice(const ALCchar *name, al_string *devnames) { |