Commit 06fed775 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wineandroid: Use ntdll for UTF8 conversion.

parent 8d0b3b08
......@@ -755,9 +755,10 @@ jboolean keyboard_event( JNIEnv *env, jobject obj, jint win, jint action, jint k
*/
INT ANDROID_GetKeyNameText( LONG lparam, LPWSTR buffer, INT size )
{
int scancode, vkey, len;
int scancode, vkey;
const char *name;
char key[2];
DWORD len;
scancode = (lparam >> 16) & 0x1FF;
vkey = scancode_to_vkey( scancode );
......@@ -795,7 +796,8 @@ INT ANDROID_GetKeyNameText( LONG lparam, LPWSTR buffer, INT size )
name = vkey_to_name( vkey );
}
len = MultiByteToWideChar( CP_UTF8, 0, name, -1, buffer, size );
RtlUTF8ToUnicodeN( buffer, size * sizeof(WCHAR), &len, name, strlen( name ) + 1 );
len /= sizeof(WCHAR);
if (len) len--;
if (!len)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment