From eb855e8fe63aba3bd8438f22255a8ee5ce316f8e Mon Sep 17 00:00:00 2001 From: JamesWrigley Date: Wed, 9 Aug 2023 19:26:05 +0200 Subject: [PATCH 1/2] Fix an enum to use the new name from ImGui --- src/interface.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interface.jl b/src/interface.jl index 0eb28f5..daeb324 100644 --- a/src/interface.jl +++ b/src/interface.jl @@ -33,7 +33,7 @@ function init(ctx::Context) c_set!(io.KeyMap, ImGuiKey_Space, GLFW_KEY_SPACE) c_set!(io.KeyMap, ImGuiKey_Enter, GLFW_KEY_ENTER) c_set!(io.KeyMap, ImGuiKey_Escape, GLFW_KEY_ESCAPE) - c_set!(io.KeyMap, ImGuiKey_KeyPadEnter, GLFW_KEY_KP_ENTER) + c_set!(io.KeyMap, ImGuiKey_KeypadEnter, GLFW_KEY_KP_ENTER) c_set!(io.KeyMap, ImGuiKey_A, GLFW_KEY_A) c_set!(io.KeyMap, ImGuiKey_C, GLFW_KEY_C) c_set!(io.KeyMap, ImGuiKey_V, GLFW_KEY_V) From d0a7a68cb78c9c91a7cdeeb000ade20d0c427b71 Mon Sep 17 00:00:00 2001 From: JamesWrigley Date: Tue, 15 Aug 2023 11:52:05 +0200 Subject: [PATCH 2/2] Explictly pass Cint arguments Previously these were all Int64's, which would cause method errors since the bindings strictly only allow Cint's. --- src/platform.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform.jl b/src/platform.jl index 3f6bec8..b162963 100644 --- a/src/platform.jl +++ b/src/platform.jl @@ -76,7 +76,7 @@ function ImGui_ImplGlfw_DestroyWindow(viewport::Ptr{ImGuiViewport}) win = Ptr{GLFWwindow}(unsafe_load(data.Window)) for i = 0:length(ctx.KeyOwnerWindows)-1 if ctx.KeyOwnerWindows[i+1] == win - ImGui_ImplGlfw_KeyCallback(win, i, 0, GLFW_RELEASE, 0) + ImGui_ImplGlfw_KeyCallback(win, Cint(i), Cint(0), Cint(GLFW_RELEASE), Cint(0)) end end glfwDestroyWindow(win)