Allow empty device specifiers when opening; treat them like NULL

This commit is contained in:
Chris Robinson 2007-12-26 17:38:42 -08:00
parent 2ee389044b
commit dcac0de44c

View File

@ -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)
{