diff options
author | Chris Robinson <[email protected]> | 2009-08-27 01:47:41 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-08-27 01:47:41 -0700 |
commit | 45dc8048193162edbb886921cfcf2955c5232626 (patch) | |
tree | d99e7a4cb49400b5395be15c69c34d3ad59c989e /Alc/ALc.c | |
parent | 81db01ebf1d6b608339b5288785f3c514dbcff27 (diff) |
Store copies of the device names in the individual backends
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r-- | Alc/ALc.c | 18 |
1 files changed, 6 insertions, 12 deletions
@@ -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; } /* |