diff options
author | Chris Robinson <[email protected]> | 2015-09-10 22:15:40 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2015-09-10 22:15:40 -0700 |
commit | 87f3babe2ceb3e7223a82c487111a15c24a9e8a9 (patch) | |
tree | 5730286f4b53d26e3ffbd29cc1b14ff4bdb24a49 /Alc/backends/dsound.c | |
parent | 9469c4c79b8dd683f8f9c53239701b15bdbfc22d (diff) |
Append "on OpenAL Soft" to mmdevapi, dsound, and winmm device names
Would be nicer to have a more backend-agnostic method of doing this, Perhaps
even also only when the router is being used.
Diffstat (limited to 'Alc/backends/dsound.c')
-rw-r--r-- | Alc/backends/dsound.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Alc/backends/dsound.c b/Alc/backends/dsound.c index 174cc42f..4db4b557 100644 --- a/Alc/backends/dsound.c +++ b/Alc/backends/dsound.c @@ -60,6 +60,8 @@ DEFINE_GUID(KSDATAFORMAT_SUBTYPE_PCM, 0x00000001, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); DEFINE_GUID(KSDATAFORMAT_SUBTYPE_IEEE_FLOAT, 0x00000003, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); +#define DEVNAME_TAIL " on OpenAL Soft" + #ifdef HAVE_DYNLOAD static void *ds_handle; @@ -144,17 +146,18 @@ static BOOL CALLBACK DSoundEnumDevices(GUID *guid, const WCHAR *desc, const WCHA const DevMap *iter; al_string_copy_wcstr(&entry.name, desc); - if(count != 0) + if(count == 0) + al_string_append_cstr(&entry.name, DEVNAME_TAIL); + else { char str[64]; - snprintf(str, sizeof(str), " #%d", count+1); + snprintf(str, sizeof(str), " #%d"DEVNAME_TAIL, count+1); al_string_append_cstr(&entry.name, str); } #define MATCH_ENTRY(i) (al_string_cmp(entry.name, (i)->name) == 0) VECTOR_FIND_IF(iter, const DevMap, *devices, MATCH_ENTRY); - if(iter == VECTOR_ITER_END(*devices)) - break; + if(iter == VECTOR_ITER_END(*devices)) break; #undef MATCH_ENTRY count++; } |