aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-08-17 06:15:43 -0700
committerChris Robinson <[email protected]>2011-08-17 06:15:43 -0700
commit057fef88ae75a8024fb8561a13541431f5c2bda5 (patch)
treef030ae57eca7a65ea05f33486fe2dc678b622829
parent8148626ba36456a5aed2b3e75bbe32f9e7ab0249 (diff)
Remove backends that fail to initialize
-rw-r--r--Alc/ALc.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 9fa7135d..24ebeef6 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -641,8 +641,20 @@ static void alc_initconfig(void)
}
}
- for(i = 0;BackendList[i].Init;i++)
- BackendList[i].Init(&BackendList[i].Funcs);
+ i = 0;
+ while(BackendList[i].Init)
+ {
+ if(BackendList[i].Init(&BackendList[i].Funcs))
+ i++;
+ else
+ {
+ int n = i;
+ do {
+ BackendList[n] = BackendList[n+1];
+ ++n;
+ } while(BackendList[n].Init);
+ }
+ }
BackendLoopback.Init(&BackendLoopback.Funcs);
str = GetConfigValue(NULL, "excludefx", "");