Skip to content

Commit

Permalink
untyped pointers fail when you use c++ compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
theoden8 authored and RobLoach committed Sep 29, 2024
1 parent 2156b95 commit fa9f257
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions demo/glfw_opengl3/nuklear_glfw_gl3.h
Original file line number Diff line number Diff line change
Expand Up @@ -315,15 +315,15 @@ nk_glfw3_render(struct nk_glfw* glfw, enum nk_anti_aliasing AA, int max_vertex_b
NK_API void
nk_glfw3_char_callback(GLFWwindow *win, unsigned int codepoint)
{
struct nk_glfw* glfw = glfwGetWindowUserPointer(win);
struct nk_glfw* glfw = (struct nk_glfw *)glfwGetWindowUserPointer(win);
if (glfw->text_len < NK_GLFW_TEXT_MAX)
glfw->text[glfw->text_len++] = codepoint;
}

NK_API void
nk_gflw3_scroll_callback(GLFWwindow *win, double xoff, double yoff)
{
struct nk_glfw* glfw = glfwGetWindowUserPointer(win);
struct nk_glfw* glfw = (struct nk_glfw *)glfwGetWindowUserPointer(win);
(void)xoff;
glfw->scroll.x += (float)xoff;
glfw->scroll.y += (float)yoff;
Expand All @@ -332,7 +332,7 @@ nk_gflw3_scroll_callback(GLFWwindow *win, double xoff, double yoff)
NK_API void
nk_glfw3_mouse_button_callback(GLFWwindow* win, int button, int action, int mods)
{
struct nk_glfw* glfw = glfwGetWindowUserPointer(win);
struct nk_glfw* glfw = (struct nk_glfw *)glfwGetWindowUserPointer(win);
double x, y;
NK_UNUSED(mods);
if (button != GLFW_MOUSE_BUTTON_LEFT) return;
Expand Down

0 comments on commit fa9f257

Please sign in to comment.