diff src/stdlib/SDL_string.c @ 1901:f1828a500391

Removed libc dependency on Windows again, to fix building with Visual C++ 2005 Express Edition. Fixed performance problem with testsprite2 on the D3D driver.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 13 Jul 2006 08:13:02 +0000
parents c121d94672cb
children f132024010be
line wrap: on
line diff
--- a/src/stdlib/SDL_string.c	Wed Jul 12 09:25:17 2006 +0000
+++ b/src/stdlib/SDL_string.c	Thu Jul 13 08:13:02 2006 +0000
@@ -336,6 +336,18 @@
 }
 #endif
 
+#ifndef HAVE_WCSLEN
+size_t
+SDL_wcslen(const wchar_t *string)
+{
+    size_t len = 0;
+    while (*string++) {
+        ++len;
+    }
+    return len;
+}
+#endif
+
 #ifndef HAVE_STRLCPY
 size_t
 SDL_strlcpy(char *dst, const char *src, size_t maxlen)