diff options
author | Chris Robinson <[email protected]> | 2011-08-24 14:24:48 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-08-24 14:24:48 -0700 |
commit | c696d4dbb23461066ed741a36a83da10b6ad17f5 (patch) | |
tree | d1b8f683f74d235828f52b2986f84dbee30ef458 /Alc/ALc.c | |
parent | f5195ee4f27f4c0bc5ea87dde6638a4a8ad97005 (diff) |
Return an ALC error enum from the OpenPlayback backend method
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r-- | Alc/ALc.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -2354,6 +2354,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName) { const ALCchar *fmt; ALCdevice *device; + ALCenum err; DO_INITCONFIG(); @@ -2431,7 +2432,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName) // Find a playback device to open LockLists(); - if(ALCdevice_OpenPlayback(device, deviceName)) + if((err=ALCdevice_OpenPlayback(device, deviceName)) == ALC_NO_ERROR) { device->next = g_pDeviceList; g_pDeviceList = device; @@ -2443,7 +2444,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName) DeleteCriticalSection(&device->Mutex); free(device); device = NULL; - alcSetError(NULL, ALC_INVALID_VALUE); + alcSetError(NULL, err); } UnlockLists(); |