diff src/video/wincommon/SDL_sysevents.c @ 1505:4d005dfbb7f5

Fixed bug #139 The text in SDL_WM_SetCaption() is in UTF-8 encoding.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 13 Mar 2006 01:33:58 +0000
parents 3968f7cba10c
children 21b1fbb53f4a
line wrap: on
line diff
--- a/src/video/wincommon/SDL_sysevents.c	Mon Mar 13 01:20:05 2006 +0000
+++ b/src/video/wincommon/SDL_sysevents.c	Mon Mar 13 01:33:58 2006 +0000
@@ -762,13 +762,9 @@
 	if ( name ) {
 #ifdef _WIN32_WCE
 		/* WinCE uses the UNICODE version */
-		size_t nLen = SDL_strlen(name)+1;
-		SDL_Appname = SDL_malloc(nLen*2);
-		MultiByteToWideChar(CP_ACP, 0, name, -1, SDL_Appname, nLen);
+		SDL_Appname = SDL_iconv_utf8_ucs2(name);
 #else
-		size_t nLen = SDL_strlen(name)+1;
-		SDL_Appname = SDL_malloc(nLen);
-		SDL_strlcpy(SDL_Appname, name, nLen);
+		SDL_Appname = SDL_iconv_utf8_latin1(name);
 #endif /* _WIN32_WCE */
 		SDL_Appstyle = style;
 		SDL_Instance = hInst ? hInst : SDL_GetModuleHandle();