aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/winmm.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-08-27 02:53:09 -0700
committerChris Robinson <[email protected]>2009-08-27 02:53:09 -0700
commit6bb14e45cee9d8d7da37675cc6933146f7a95155 (patch)
tree238b8354671a87e00867af28424a4bf23b813e1c /Alc/winmm.c
parent45dc8048193162edbb886921cfcf2955c5232626 (diff)
Store a copy of the device name in the device
Diffstat (limited to 'Alc/winmm.c')
-rw-r--r--Alc/winmm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Alc/winmm.c b/Alc/winmm.c
index 3b226f29..1f62f5a1 100644
--- a/Alc/winmm.c
+++ b/Alc/winmm.c
@@ -198,7 +198,6 @@ static ALCboolean WinMMOpenCapture(ALCdevice *pDevice, const ALCchar *deviceName
if(i == NumCaptureDevices)
return ALC_FALSE;
}
- pDevice->szDeviceName = CaptureDeviceList[lDeviceID];
pData = calloc(1, sizeof(*pData));
if(!pData)
@@ -268,6 +267,7 @@ static ALCboolean WinMMOpenCapture(ALCdevice *pDevice, const ALCchar *deviceName
if (pData->hWaveInThread == NULL)
goto failure;
+ pDevice->szDeviceName = strdup(CaptureDeviceList[lDeviceID]);
return ALC_TRUE;
failure:
@@ -291,6 +291,7 @@ failure:
CloseHandle(pData->hWaveInThreadEvent);
free(pData);
+ pDevice->ExtraData = NULL;
return ALC_FALSE;
}