diff options
author | Chris Robinson <[email protected]> | 2007-12-26 17:38:42 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2007-12-26 17:38:42 -0800 |
commit | dcac0de44ce1856fea0ff2d8d71feb2346aa911c (patch) | |
tree | 196b4430cf5b06ef99462d9ff3609b6cc0035915 /Alc | |
parent | 2ee389044bc6ff1a8b066eb70f41cc8ec883f5fa (diff) |
Allow empty device specifiers when opening; treat them like NULL
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALc.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -409,6 +409,9 @@ ALCAPI ALCdevice* ALCAPIENTRY alcCaptureOpenDevice(const ALCchar *deviceName, AL InitAL(); + if(deviceName && !deviceName[0]) + deviceName = NULL; + pDevice = malloc(sizeof(ALCdevice)); if (pDevice) { @@ -1034,6 +1037,9 @@ ALCAPI ALCdevice* ALCAPIENTRY alcOpenDevice(const ALCchar *deviceName) InitAL(); + if(deviceName && !deviceName[0]) + deviceName = NULL; + device = malloc(sizeof(ALCdevice)); if (device) { |