You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My Question: The way of obtaining Language Identifier is inconsistent with the explanation on the MSDN. Does it have any potential problems?
ImGui_ImplWin32_UpdateKeyboardCodePage() in imgui_impl_win32.cpp:
HKL keyboard_layout = ::GetKeyboardLayout(0);
LCID keyboard_lcid = MAKELCID(HIWORD(keyboard_layout), SORT_DEFAULT);
if (::GetLocaleInfoA(keyboard_lcid, (LOCALE_RETURN_NUMBER | LOCALE_IDEFAULTANSICODEPAGE), (LPSTR)&bd->KeyboardCodePage, sizeof(bd->KeyboardCodePage)) == 0)
bd->KeyboardCodePage = CP_ACP; // Fallback to default ANSI code page when fails.
In msdn, however, it explains the return value of the GetKeyboardLayout function as this :
The return value is the input locale identifier for the thread. The low word contains a Language Identifier for the input language and the high word contains a device handle to the physical layout of the keyboard.
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
No response
The text was updated successfully, but these errors were encountered:
Version/Branch of Dear ImGui:
Version 1.91.6, Branch: master
Back-ends:
imgui_impl_win32.cpp
Compiler, OS:
Windows11 + MSVC 2022
Full config/build information:
No response
Details:
My Question: The way of obtaining Language Identifier is inconsistent with the explanation on the MSDN. Does it have any potential problems?
ImGui_ImplWin32_UpdateKeyboardCodePage() in imgui_impl_win32.cpp:
In msdn, however, it explains the return value of the GetKeyboardLayout function as this :
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
No response
The text was updated successfully, but these errors were encountered: