Skip to content

Commit

Permalink
IO: fix unintentional MouseSouce type in AddMousePosEvent and AddMous…
Browse files Browse the repository at this point in the history
…eButtonEvent. (ocornut#2702)
  • Loading branch information
RickHuang2001 committed Aug 16, 2023
1 parent 1e17d59 commit fc5e616
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1531,7 +1531,7 @@ void ImGuiIO::AddMousePosEvent(float x, float y)
e.EventId = g.InputEventsNextEventId++;
e.MousePos.PosX = pos.x;
e.MousePos.PosY = pos.y;
e.MouseWheel.MouseSource = g.InputEventsNextMouseSource;
e.MousePos.MouseSource = g.InputEventsNextMouseSource;
g.InputEventsQueue.push_back(e);
}

Expand All @@ -1555,7 +1555,7 @@ void ImGuiIO::AddMouseButtonEvent(int mouse_button, bool down)
e.EventId = g.InputEventsNextEventId++;
e.MouseButton.Button = mouse_button;
e.MouseButton.Down = down;
e.MouseWheel.MouseSource = g.InputEventsNextMouseSource;
e.MouseButton.MouseSource = g.InputEventsNextMouseSource;
g.InputEventsQueue.push_back(e);
}

Expand Down

0 comments on commit fc5e616

Please sign in to comment.