aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-08-27 01:47:41 -0700
committerChris Robinson <[email protected]>2009-08-27 01:47:41 -0700
commit45dc8048193162edbb886921cfcf2955c5232626 (patch)
treed99e7a4cb49400b5395be15c69c34d3ad59c989e /Alc/ALc.c
parent81db01ebf1d6b608339b5288785f3c514dbcff27 (diff)
Store copies of the device names in the individual backends
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index a47a03d2..588ba903 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -351,43 +351,37 @@ static void InitAL(void)
}
}
-ALCchar *AppendDeviceList(char *name)
+void AppendDeviceList(const ALCchar *name)
{
static size_t pos;
- ALCchar *ret = alcDeviceList+pos;
if(pos >= sizeof(alcDeviceList))
{
AL_PRINT("Not enough room to add %s!\n", name);
- return alcDeviceList + sizeof(alcDeviceList) - 1;
+ return;
}
pos += snprintf(alcDeviceList+pos, sizeof(alcDeviceList)-pos-1, "%s", name) + 1;
- return ret;
}
-ALCchar *AppendAllDeviceList(char *name)
+void AppendAllDeviceList(const ALCchar *name)
{
static size_t pos;
- ALCchar *ret = alcAllDeviceList+pos;
if(pos >= sizeof(alcAllDeviceList))
{
AL_PRINT("Not enough room to add %s!\n", name);
- return alcAllDeviceList + sizeof(alcAllDeviceList) - 1;
+ return;
}
pos += snprintf(alcAllDeviceList+pos, sizeof(alcAllDeviceList)-pos-1, "%s", name) + 1;
- return ret;
}
-ALCchar *AppendCaptureDeviceList(char *name)
+void AppendCaptureDeviceList(const ALCchar *name)
{
static size_t pos;
- ALCchar *ret = alcCaptureDeviceList+pos;
if(pos >= sizeof(alcCaptureDeviceList))
{
AL_PRINT("Not enough room to add %s!\n", name);
- return alcCaptureDeviceList + sizeof(alcCaptureDeviceList) - 1;
+ return;
}
pos += snprintf(alcCaptureDeviceList+pos, sizeof(alcCaptureDeviceList)-pos-1, "%s", name) + 1;
- return ret;
}
/*