fix: Invalid key code error spam
This commit is contained in:
parent
5bbf4342ee
commit
cb9a3b1f55
@ -414,6 +414,10 @@ void ImGui_ImplGlfw_KeyCallback(GLFWwindow* window, int keycode, int scancode, i
|
|||||||
if (bd->PrevUserCallbackKey != NULL && window == bd->Window)
|
if (bd->PrevUserCallbackKey != NULL && window == bd->Window)
|
||||||
bd->PrevUserCallbackKey(window, keycode, scancode, action, mods);
|
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)
|
if (action != GLFW_PRESS && action != GLFW_RELEASE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
2
lib/external/pattern_language
vendored
2
lib/external/pattern_language
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 49f3fb30dcb3044a2bb535958b7b954c81ec23ef
|
Subproject commit 2b0c7a4a4c2325a5cd6dc6104b5a85bbde85ff37
|
@ -30,6 +30,8 @@ enum ImGuiCustomCol {
|
|||||||
ImGuiCustomCol_IEEEToolExp,
|
ImGuiCustomCol_IEEEToolExp,
|
||||||
ImGuiCustomCol_IEEEToolMantissa,
|
ImGuiCustomCol_IEEEToolMantissa,
|
||||||
|
|
||||||
|
ImGuiCustomCol_BlurBackground,
|
||||||
|
|
||||||
ImGuiCustomCol_COUNT
|
ImGuiCustomCol_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -864,6 +864,8 @@ namespace hex {
|
|||||||
glfwSetKeyCallback(this->m_window, [](GLFWwindow *window, int key, int scancode, int action, int mods) {
|
glfwSetKeyCallback(this->m_window, [](GLFWwindow *window, int key, int scancode, int action, int mods) {
|
||||||
hex::unused(mods);
|
hex::unused(mods);
|
||||||
|
|
||||||
|
if (key == GLFW_KEY_UNKNOWN) return;
|
||||||
|
|
||||||
auto keyName = glfwGetKeyName(key, scancode);
|
auto keyName = glfwGetKeyName(key, scancode);
|
||||||
if (keyName != nullptr)
|
if (keyName != nullptr)
|
||||||
key = std::toupper(keyName[0]);
|
key = std::toupper(keyName[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user