Mercurial > sdl-ios-xcode
comparison src/video/wincommon/SDL_syswm.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 | deb22b9fe970 |
children | 720f8bb49d7d |
comparison
equal
deleted
inserted
replaced
1504:7b4b31075f67 | 1505:4d005dfbb7f5 |
---|---|
228 | 228 |
229 void WIN_SetWMCaption(_THIS, const char *title, const char *icon) | 229 void WIN_SetWMCaption(_THIS, const char *title, const char *icon) |
230 { | 230 { |
231 #ifdef _WIN32_WCE | 231 #ifdef _WIN32_WCE |
232 /* WinCE uses the UNICODE version */ | 232 /* WinCE uses the UNICODE version */ |
233 int nLen = SDL_strlen(title)+1; | 233 LPWSTR lpszW = SDL_iconv_utf8_ucs2(title); |
234 LPWSTR lpszW = alloca(nLen*2); | |
235 MultiByteToWideChar(CP_ACP, 0, title, -1, lpszW, nLen); | |
236 SetWindowText(SDL_Window, lpszW); | 234 SetWindowText(SDL_Window, lpszW); |
235 SDL_free(lpszW); | |
237 #else | 236 #else |
238 SetWindowText(SDL_Window, title); | 237 char *lpsz = SDL_iconv_utf8_latin1(title); |
238 SetWindowText(SDL_Window, lpsz); | |
239 SDL_free(lpsz); | |
239 #endif | 240 #endif |
240 } | 241 } |
241 | 242 |
242 int WIN_IconifyWindow(_THIS) | 243 int WIN_IconifyWindow(_THIS) |
243 { | 244 { |