aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
Diffstat (limited to 'Alc')
-rw-r--r--Alc/winmm.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/Alc/winmm.c b/Alc/winmm.c
index 747a250b..750cce40 100644
--- a/Alc/winmm.c
+++ b/Alc/winmm.c
@@ -70,7 +70,23 @@ static void ProbeDevices(void)
if(waveInGetDevCaps(i, &WaveInCaps, sizeof(WAVEINCAPS)) == MMSYSERR_NOERROR)
{
char name[1024];
- snprintf(name, sizeof(name), "%s via WaveIn", WaveInCaps.szPname);
+ ALuint count, j;
+
+ count = 0;
+ do {
+ if(count == 0)
+ snprintf(name, sizeof(name), "%s via WaveIn", WaveInCaps.szPname);
+ else
+ snprintf(name, sizeof(name), "%s #%d via WaveIn", WaveInCaps.szPname, count+1);
+ count++;
+
+ for(j = 0;j < i;j++)
+ {
+ if(strcmp(name, CaptureDeviceList[j]) == 0)
+ break;
+ }
+ } while(j != i);
+
CaptureDeviceList[i] = strdup(name);
}
}