src/video/wincommon/SDL_syswm.c
changeset 1505 4d005dfbb7f5
parent 1481 deb22b9fe970
child 1510 720f8bb49d7d
--- a/src/video/wincommon/SDL_syswm.c	Mon Mar 13 01:20:05 2006 +0000
+++ b/src/video/wincommon/SDL_syswm.c	Mon Mar 13 01:33:58 2006 +0000
@@ -230,12 +230,13 @@
 {
 #ifdef _WIN32_WCE
 	/* WinCE uses the UNICODE version */
-	int nLen = SDL_strlen(title)+1;
-	LPWSTR lpszW = alloca(nLen*2);
-	MultiByteToWideChar(CP_ACP, 0, title, -1, lpszW, nLen);
+	LPWSTR lpszW = SDL_iconv_utf8_ucs2(title);
 	SetWindowText(SDL_Window, lpszW);
+	SDL_free(lpszW);
 #else
-	SetWindowText(SDL_Window, title);
+	char *lpsz = SDL_iconv_utf8_latin1(title);
+	SetWindowText(SDL_Window, lpsz);
+	SDL_free(lpsz);
 #endif
 }