win32u: Don't set the high word of keyboard layout to 0xe001 in CJK locales.
The high word of the keyboard layout in CJK locale on Vista+ is the same as the low word, even when IME is on according to tests in user32 and manual tests on Windows 10. Fix Super Robo Wars 30 (SteamID: 898750) crash on start when CJK locales are used.
This commit is contained in:
parent
0b19f8b2ff
commit
28a829a1da
3 changed files with 2 additions and 30 deletions
|
@ -38,7 +38,6 @@ WINE_DECLARE_DEBUG_CHANNEL(keyboard);
|
|||
static HKL get_locale_kbd_layout(void)
|
||||
{
|
||||
ULONG_PTR layout;
|
||||
LANGID langid;
|
||||
|
||||
/* FIXME:
|
||||
*
|
||||
|
@ -52,19 +51,7 @@ static HKL get_locale_kbd_layout(void)
|
|||
*/
|
||||
|
||||
layout = GetUserDefaultLCID();
|
||||
|
||||
/*
|
||||
* Microsoft Office expects this value to be something specific
|
||||
* for Japanese and Korean Windows with an IME the value is 0xe001
|
||||
* We should probably check to see if an IME exists and if so then
|
||||
* set this word properly.
|
||||
*/
|
||||
langid = PRIMARYLANGID( LANGIDFROMLCID( layout ) );
|
||||
if (langid == LANG_CHINESE || langid == LANG_JAPANESE || langid == LANG_KOREAN)
|
||||
layout = MAKELONG( layout, 0xe001 ); /* IME */
|
||||
else
|
||||
layout = MAKELONG( layout, layout );
|
||||
|
||||
layout = MAKELONG( layout, layout );
|
||||
return (HKL)layout;
|
||||
}
|
||||
|
||||
|
|
|
@ -5248,7 +5248,6 @@ static void test_keyboard_layout(void)
|
|||
if (lang_id == LANG_CHINESE || lang_id == LANG_JAPANESE || lang_id == LANG_KOREAN)
|
||||
{
|
||||
hkl = GetKeyboardLayout(0);
|
||||
todo_wine
|
||||
ok(HIWORD(hkl) == LOWORD(hkl), "Got unexpected hkl %p.\n", hkl);
|
||||
|
||||
if (lang_id == LANG_CHINESE)
|
||||
|
@ -5258,7 +5257,6 @@ static void test_keyboard_layout(void)
|
|||
else if (lang_id == LANG_KOREAN)
|
||||
layout_name = "00000412";
|
||||
hkl = LoadKeyboardLayoutA(layout_name, 0);
|
||||
todo_wine
|
||||
ok(HIWORD(hkl) == LOWORD(hkl), "Got unexpected hkl %p.\n", hkl);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -913,7 +913,6 @@ DWORD get_input_state(void)
|
|||
static HKL get_locale_kbd_layout(void)
|
||||
{
|
||||
LCID layout;
|
||||
LANGID langid;
|
||||
|
||||
/* FIXME:
|
||||
*
|
||||
|
@ -927,19 +926,7 @@ static HKL get_locale_kbd_layout(void)
|
|||
*/
|
||||
|
||||
NtQueryDefaultLocale( TRUE, &layout );
|
||||
|
||||
/*
|
||||
* Microsoft Office expects this value to be something specific
|
||||
* for Japanese and Korean Windows with an IME the value is 0xe001
|
||||
* We should probably check to see if an IME exists and if so then
|
||||
* set this word properly.
|
||||
*/
|
||||
langid = PRIMARYLANGID( LANGIDFROMLCID( layout ) );
|
||||
if (langid == LANG_CHINESE || langid == LANG_JAPANESE || langid == LANG_KOREAN)
|
||||
layout = MAKELONG( layout, 0xe001 ); /* IME */
|
||||
else
|
||||
layout = MAKELONG( layout, layout );
|
||||
|
||||
layout = MAKELONG( layout, layout );
|
||||
return ULongToHandle( layout );
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue