diff options
author | Chris Robinson <[email protected]> | 2011-08-24 14:44:15 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-08-24 14:44:15 -0700 |
commit | 7e2155d937e66dc7c4a1445bf12e64684eebb5a0 (patch) | |
tree | 4af5b1cc0f824b60e30be1d1d9cfed9216d8ac7a /Alc/ALc.c | |
parent | c696d4dbb23461066ed741a36a83da10b6ad17f5 (diff) |
Return an ALC error enum from the OpenCapture backend method
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r-- | Alc/ALc.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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(); |