[IMM32] Rewrite ImmGetVirtualKey (#3889)

Implementing Japanese input. CORE-11700
This commit is contained in:
Katayama Hirofumi MZ 2021-08-10 08:03:32 +09:00 committed by GitHub
parent ad8d8b6628
commit 6b24e73d41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3130,25 +3130,22 @@ BOOL WINAPI ImmGetStatusWindowPos(HIMC hIMC, LPPOINT lpptPos)
*/
UINT WINAPI ImmGetVirtualKey(HWND hWnd)
{
OSVERSIONINFOA version;
InputContextData *data = ImmGetContext( hWnd );
TRACE("%p\n", hWnd);
HIMC hIMC;
LPINPUTCONTEXTDX pIC;
UINT ret = VK_PROCESSKEY;
if ( data )
return data->lastVK;
TRACE("(%p)\n", hWnd);
version.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
GetVersionExA( &version );
switch(version.dwPlatformId)
{
case VER_PLATFORM_WIN32_WINDOWS:
return VK_PROCESSKEY;
case VER_PLATFORM_WIN32_NT:
return 0;
default:
FIXME("%d not supported\n",version.dwPlatformId);
return VK_PROCESSKEY;
}
hIMC = ImmGetContext(hWnd);
pIC = (LPINPUTCONTEXTDX)ImmLockIMC(hIMC);
if (!pIC)
return ret;
if (pIC->bHasVKey)
ret = pIC->nVKey;
ImmUnlockIMC(hIMC);
return ret;
}
/***********************************************************************