Skip to content

Commit

Permalink
fix for clang-15
Browse files Browse the repository at this point in the history
  • Loading branch information
malytomas committed Oct 29, 2024
1 parent 059aae9 commit 629c875
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sources/libengine/window/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,10 +335,12 @@ namespace cage
if (glfwGetMouseButton(w, GLFW_MOUSE_BUTTON_MIDDLE))
e.buttons |= MouseButtonsFlags::Middle;
e.relative = impl->getRelative();
static_assert(sizeof(input::MouseRelativeMove) == sizeof(input::privat::BaseMouse));
static_assert(sizeof(input::MouseMove) == sizeof(input::privat::BaseMouse));
if (e.relative)
impl->eventsQueue.push(input::MouseRelativeMove(e));
impl->eventsQueue.push(*(input::MouseRelativeMove *)(&e));
else
impl->eventsQueue.push(input::MouseMove(e));
impl->eventsQueue.push(*(input::MouseMove *)(&e));
}

void windowMouseButtonCallback(GLFWwindow *w, int button, int action, int mods)
Expand Down

0 comments on commit 629c875

Please sign in to comment.