Skip to content

Commit

Permalink
Dispose of MouseState at end of UpdateImGuiInput
Browse files Browse the repository at this point in the history
  • Loading branch information
rbertels committed Sep 22, 2024
1 parent ee15e60 commit 47a31fb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ private void UpdateImGuiInput()
{
var io = ImGuiNET.ImGui.GetIO();

var mouseState = _input.Mice[0].CaptureState();
using var mouseState = _input.Mice[0].CaptureState();

io.MouseDown[0] = mouseState.IsButtonPressed(MouseButton.Left);
io.MouseDown[1] = mouseState.IsButtonPressed(MouseButton.Right);
Expand Down

0 comments on commit 47a31fb

Please sign in to comment.