diff options
author | Chris Robinson <[email protected]> | 2015-12-04 15:52:43 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2015-12-04 15:52:43 -0800 |
commit | e45ff473618f3400def59fc3a06cec9fdc62452b (patch) | |
tree | b1163f1e3c195098424652b5c061df3c7ed2d292 /Alc/backends/winmm.c | |
parent | 63567526b0a17449baf57053d11688aa277a7e40 (diff) |
Reformat Windows device name dressing
Diffstat (limited to 'Alc/backends/winmm.c')
-rw-r--r-- | Alc/backends/winmm.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/Alc/backends/winmm.c b/Alc/backends/winmm.c index bf97ef2e..3508ec49 100644 --- a/Alc/backends/winmm.c +++ b/Alc/backends/winmm.c @@ -37,7 +37,7 @@ #define WAVE_FORMAT_IEEE_FLOAT 0x0003 #endif -#define DEVNAME_TAIL " on OpenAL Soft" +#define DEVNAME_HEAD "OpenAL Soft on " static vector_al_string PlaybackDevices; @@ -71,13 +71,12 @@ static void ProbePlaybackDevices(void) ALuint count = 0; while(1) { - al_string_copy_wcstr(&dname, WaveCaps.szPname); - if(count == 0) - al_string_append_cstr(&dname, DEVNAME_TAIL); - else + al_string_copy_cstr(&dname, DEVNAME_HEAD); + al_string_append_wcstr(&dname, WaveCaps.szPname); + if(count != 0) { char str[64]; - snprintf(str, sizeof(str), " #%d"DEVNAME_TAIL, count+1); + snprintf(str, sizeof(str), " #%d", count+1); al_string_append_cstr(&dname, str); } count++; @@ -115,13 +114,12 @@ static void ProbeCaptureDevices(void) ALuint count = 0; while(1) { - al_string_copy_wcstr(&dname, WaveCaps.szPname); - if(count == 0) - al_string_append_cstr(&dname, DEVNAME_TAIL); - else + al_string_copy_cstr(&dname, DEVNAME_HEAD); + al_string_append_wcstr(&dname, WaveCaps.szPname); + if(count != 0) { char str[64]; - snprintf(str, sizeof(str), " #%d"DEVNAME_TAIL, count+1); + snprintf(str, sizeof(str), " #%d", count+1); al_string_append_cstr(&dname, str); } count++; |