aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-08-24 14:44:15 -0700
committerChris Robinson <[email protected]>2011-08-24 14:44:15 -0700
commit7e2155d937e66dc7c4a1445bf12e64684eebb5a0 (patch)
tree4af5b1cc0f824b60e30be1d1d9cfed9216d8ac7a /Alc/ALc.c
parentc696d4dbb23461066ed741a36a83da10b6ad17f5 (diff)
Return an ALC error enum from the OpenCapture backend method
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();