comparison 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
comparison
equal deleted inserted replaced
1504:7b4b31075f67 1505:4d005dfbb7f5
760 } 760 }
761 761
762 if ( name ) { 762 if ( name ) {
763 #ifdef _WIN32_WCE 763 #ifdef _WIN32_WCE
764 /* WinCE uses the UNICODE version */ 764 /* WinCE uses the UNICODE version */
765 size_t nLen = SDL_strlen(name)+1; 765 SDL_Appname = SDL_iconv_utf8_ucs2(name);
766 SDL_Appname = SDL_malloc(nLen*2);
767 MultiByteToWideChar(CP_ACP, 0, name, -1, SDL_Appname, nLen);
768 #else 766 #else
769 size_t nLen = SDL_strlen(name)+1; 767 SDL_Appname = SDL_iconv_utf8_latin1(name);
770 SDL_Appname = SDL_malloc(nLen);
771 SDL_strlcpy(SDL_Appname, name, nLen);
772 #endif /* _WIN32_WCE */ 768 #endif /* _WIN32_WCE */
773 SDL_Appstyle = style; 769 SDL_Appstyle = style;
774 SDL_Instance = hInst ? hInst : SDL_GetModuleHandle(); 770 SDL_Instance = hInst ? hInst : SDL_GetModuleHandle();
775 } 771 }
776 772