Also show Japanese titles for Windows, use UTF-8 for translations under Windows (Trad. Chinese or Russian are shown properly under Simp. Chinese OS now).
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@48637 e17a0e51-4ae3-4d35-97c3-1a29b211df97
This commit is contained in:
parent
e594a282ee
commit
5334f89af8
|
@ -1,3 +1,9 @@
|
|||
May 24, 2010 Wei Mingzhi <whistler_wmz@users.sf.net>
|
||||
|
||||
* win32/gui/WndMain.c: Also show Japanese titles properly for Windows
|
||||
(need to set ACP to east-asian languages).
|
||||
* win32/intl/gettext.c: Added a hack for UTF-8 support.
|
||||
|
||||
May 23, 2010 Wei Mingzhi <whistler_wmz@users.sf.net>
|
||||
|
||||
* AUTHORS: Updated info.
|
||||
|
|
|
@ -843,14 +843,21 @@ void UpdateMcdItems(int mcd, int idc) {
|
|||
void McdListGetDispInfo(int mcd, int idc, LPNMHDR pnmh) {
|
||||
LV_DISPINFO *lpdi = (LV_DISPINFO *)pnmh;
|
||||
McdBlock *Info;
|
||||
char buf[256], buftitle[256];
|
||||
|
||||
Info = &Blocks[mcd-1][lpdi->item.iItem];
|
||||
Info = &Blocks[mcd - 1][lpdi->item.iItem];
|
||||
|
||||
switch (lpdi->item.iSubItem) {
|
||||
case 0:
|
||||
switch (Info->Flags & 0xF) {
|
||||
case 1:
|
||||
lpdi->item.pszText = Info->Title;
|
||||
if (MultiByteToWideChar(932, 0, (LPCSTR)Info->sTitle, -1, (LPWSTR)buf, sizeof(buf)) == 0) {
|
||||
lpdi->item.pszText = Info->Title;
|
||||
} else if (WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)buf, -1, (LPSTR)buftitle, sizeof(buftitle), NULL, NULL) == 0) {
|
||||
lpdi->item.pszText = Info->Title;
|
||||
} else {
|
||||
lpdi->item.pszText = buftitle;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
lpdi->item.pszText = _("mid link block");
|
||||
|
|
|
@ -52,6 +52,8 @@
|
|||
# define DGETTEXT dgettext__
|
||||
#endif
|
||||
|
||||
#include <windows.h> // Added by Wei Mingzhi 5-4-2010
|
||||
|
||||
/* Look up MSGID in the current default message catalog for the current
|
||||
LC_MESSAGES locale. If not found, returns MSGID itself (the default
|
||||
text). */
|
||||
|
@ -59,7 +61,22 @@ char *
|
|||
GETTEXT (msgid)
|
||||
const char *msgid;
|
||||
{
|
||||
return DGETTEXT (NULL, msgid);
|
||||
// return DGETTEXT (NULL, msgid);
|
||||
|
||||
// 5-24-2010 Wei Mingzhi
|
||||
// Hack for UTF-8 support
|
||||
char *t = DGETTEXT(NULL, msgid);
|
||||
static char buf[16384], bufout[16384];
|
||||
|
||||
if (MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)t, -1, (LPWSTR)buf, sizeof(buf)) == 0) {
|
||||
return t;
|
||||
}
|
||||
|
||||
if (WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)buf, -1, (LPSTR)bufout, sizeof(bufout), NULL, NULL) == 0) {
|
||||
return t;
|
||||
}
|
||||
|
||||
return bufout;
|
||||
}
|
||||
|
||||
#ifdef _LIBC
|
||||
|
|
Loading…
Reference in New Issue
Block a user