mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 21:05:56 -05:00
fix: Invalid key code error spam
This commit is contained in:
@@ -414,6 +414,10 @@ void ImGui_ImplGlfw_KeyCallback(GLFWwindow* window, int keycode, int scancode, i
|
||||
if (bd->PrevUserCallbackKey != NULL && window == bd->Window)
|
||||
bd->PrevUserCallbackKey(window, keycode, scancode, action, mods);
|
||||
|
||||
// IMHEX PATCH BEGIN
|
||||
if (keycode == GLFW_KEY_UNKNOWN)
|
||||
return;
|
||||
// IMHEX PATCH END
|
||||
if (action != GLFW_PRESS && action != GLFW_RELEASE)
|
||||
return;
|
||||
|
||||
|
||||
2
lib/external/pattern_language
vendored
2
lib/external/pattern_language
vendored
Submodule lib/external/pattern_language updated: 49f3fb30dc...2b0c7a4a4c
@@ -30,6 +30,8 @@ enum ImGuiCustomCol {
|
||||
ImGuiCustomCol_IEEEToolExp,
|
||||
ImGuiCustomCol_IEEEToolMantissa,
|
||||
|
||||
ImGuiCustomCol_BlurBackground,
|
||||
|
||||
ImGuiCustomCol_COUNT
|
||||
};
|
||||
|
||||
|
||||
@@ -864,6 +864,8 @@ namespace hex {
|
||||
glfwSetKeyCallback(this->m_window, [](GLFWwindow *window, int key, int scancode, int action, int mods) {
|
||||
hex::unused(mods);
|
||||
|
||||
if (key == GLFW_KEY_UNKNOWN) return;
|
||||
|
||||
auto keyName = glfwGetKeyName(key, scancode);
|
||||
if (keyName != nullptr)
|
||||
key = std::toupper(keyName[0]);
|
||||
|
||||
Reference in New Issue
Block a user