https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2ba41ad4e0d2d845362d6…
commit 2ba41ad4e0d2d845362d6807a22bef03029314e6
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Sun Aug 28 16:12:55 2022 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Sun Aug 28 16:12:55 2022 +0900
[USER32] Retry: Fix build against 0aa9d9f and 1d10671
CORE-18338
---
win32ss/user/user32/windows/input.c | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/win32ss/user/user32/windows/input.c b/win32ss/user/user32/windows/input.c
index 0fb6ad0a459..97f84bb0d59 100644
--- a/win32ss/user/user32/windows/input.c
+++ b/win32ss/user/user32/windows/input.c
@@ -658,21 +658,12 @@ IntLoadKeyboardLayout(
WCHAR wszRegKey[256] = L"SYSTEM\\CurrentControlSet\\Control\\Keyboard
Layouts\\";
WCHAR wszLayoutId[10], wszNewKLID[10], szImeFileName[80];
HKL hNewKL;
+ HKEY hKey;
BOOL bIsIME;
dwhkl = wcstoul(pwszKLID, NULL, 16);
bIsIME = IS_IME_HKL(UlongToHandle(dwhkl));
- if (bIsIME) /* IME? */
- {
- /* Check "IME File" value */
- dwSize = sizeof(szImeFileName);
- if (RegQueryValueExW(hKey, L"IME File", NULL, &dwType,
(LPBYTE)szImeFileName,
- &dwSize) != ERROR_SUCCESS)
- {
- dwhkl = LOWORD(dwhkl);
- }
- }
- else
+ if (!bIsIME) /* Not IME? */
{
dwhkl = LOWORD(dwhkl); /* LOWORD of dwhkl is language identifier */
}
@@ -713,6 +704,14 @@ IntLoadKeyboardLayout(
dwhkl |= (0xf000 | wcstol(wszLayoutId, NULL, 16)) << 16;
}
+ /* Check "IME File" value */
+ dwSize = sizeof(szImeFileName);
+ if (RegQueryValueExW(hKey, L"IME File", NULL, &dwType,
(LPBYTE)szImeFileName,
+ &dwSize) != ERROR_SUCCESS)
+ {
+ dwhkl = LOWORD(dwhkl);
+ }
+
/* Close the key now */
RegCloseKey(hKey);
}