aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 0fe9d8a5..0cca6026 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1377,6 +1377,7 @@ static ALCvoid FreeContext(ALCcontext *context)
ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *deviceName, ALCuint frequency, ALCenum format, ALCsizei SampleSize)
{
ALCdevice *device = NULL;
+ ALCenum err;
DO_INITCONFIG();
@@ -1426,7 +1427,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *deviceName,
device->NumUpdates = 1;
LockLists();
- if(ALCdevice_OpenCapture(device, deviceName))
+ if((err=ALCdevice_OpenCapture(device, deviceName)) == ALC_NO_ERROR)
{
device->next = g_pDeviceList;
g_pDeviceList = device;
@@ -1437,7 +1438,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *deviceName,
DeleteCriticalSection(&device->Mutex);
free(device);
device = NULL;
- alcSetError(NULL, ALC_INVALID_VALUE);
+ alcSetError(NULL, err);
}
UnlockLists();