aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-08-24 14:24:48 -0700
committerChris Robinson <[email protected]>2011-08-24 14:24:48 -0700
commitc696d4dbb23461066ed741a36a83da10b6ad17f5 (patch)
treed1b8f683f74d235828f52b2986f84dbee30ef458 /Alc/ALc.c
parentf5195ee4f27f4c0bc5ea87dde6638a4a8ad97005 (diff)
Return an ALC error enum from the OpenPlayback 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 548b05c8..0fe9d8a5 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -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();