user: Added fast W->A mapping for WM_CHAR and related messages.
This commit is contained in:
parent
dd442faa2e
commit
6c4082df74
|
@ -992,21 +992,6 @@ static INT WINPROC_MapMsg32WTo32A( HWND hwnd, UINT msg, WPARAM *pwparam, LPARAM
|
|||
{
|
||||
switch(msg)
|
||||
{
|
||||
case WM_CHARTOITEM:
|
||||
case WM_MENUCHAR:
|
||||
case WM_CHAR:
|
||||
case WM_DEADCHAR:
|
||||
case WM_SYSCHAR:
|
||||
case WM_SYSDEADCHAR:
|
||||
case EM_SETPASSWORDCHAR:
|
||||
{
|
||||
WCHAR wch = LOWORD(*pwparam);
|
||||
BYTE ch;
|
||||
WideCharToMultiByte( CP_ACP, 0, &wch, 1, (LPSTR)&ch, 1, NULL, NULL );
|
||||
*pwparam = MAKEWPARAM( ch, HIWORD(*pwparam) );
|
||||
}
|
||||
return 0;
|
||||
|
||||
case WM_IME_CHAR:
|
||||
{
|
||||
WCHAR wch = LOWORD(*pwparam);
|
||||
|
@ -3007,6 +2992,22 @@ static LRESULT WINPROC_CallProc32WTo32A( WNDPROC func, HWND hwnd, UINT msg, WPAR
|
|||
}
|
||||
break;
|
||||
|
||||
case WM_CHARTOITEM:
|
||||
case WM_MENUCHAR:
|
||||
case WM_CHAR:
|
||||
case WM_DEADCHAR:
|
||||
case WM_SYSCHAR:
|
||||
case WM_SYSDEADCHAR:
|
||||
case EM_SETPASSWORDCHAR:
|
||||
{
|
||||
WCHAR wch = LOWORD(wParam);
|
||||
BYTE ch;
|
||||
RtlUnicodeToMultiByteN( (LPSTR)&ch, 1, NULL, &wch, sizeof(WCHAR) );
|
||||
wParam = MAKEWPARAM( ch, HIWORD(wParam) );
|
||||
ret = WINPROC_CallWndProc( func, hwnd, msg, wParam, lParam );
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
if ((unmap = WINPROC_MapMsg32WTo32A( hwnd, msg, &wParam, &lParam )) == -1) {
|
||||
ERR_(msg)("Message translation failed. (msg=%s,wp=%08x,lp=%08lx)\n",
|
||||
|
|
Loading…
Reference in New Issue