aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/helpers.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-03-01 06:07:00 -0800
committerChris Robinson <[email protected]>2012-03-01 06:07:00 -0800
commit8d24bd720ff5007171a252ca8a2cc363ad49de92 (patch)
treef1c7f884699f4b3b1e472803ca121377ac57f864 /Alc/helpers.c
parent55556f0e6c3d6f6ae374e0513bf92ba0b8caaef3 (diff)
Don't use GUIDs to ID mmdevapi devices, and don't enumerate if not needed
Diffstat (limited to 'Alc/helpers.c')
-rw-r--r--Alc/helpers.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/Alc/helpers.c b/Alc/helpers.c
index 7a55b8d9..693831d1 100644
--- a/Alc/helpers.c
+++ b/Alc/helpers.c
@@ -107,6 +107,22 @@ void *GetSymbol(void *handle, const char *name)
return ret;
}
+WCHAR *strdupW(const WCHAR *str)
+{
+ const WCHAR *n;
+ WCHAR *ret;
+ size_t len;
+
+ n = str;
+ while(*n) n++;
+ len = n - str;
+
+ ret = calloc(sizeof(WCHAR), len+1);
+ if(ret != NULL)
+ memcpy(ret, str, sizeof(WCHAR)*len);
+ return ret;
+}
+
#else
void InitializeCriticalSection(CRITICAL_SECTION *cs)