Improve scrolling with the thumbstick

This commit is contained in:
Guillaume Meunier
2025-08-03 10:50:22 +02:00
parent 02c3da3f9f
commit fed26b0675
2 changed files with 6 additions and 3 deletions
+5 -2
View File
@@ -711,7 +711,7 @@ void imgui_context::new_frame(XrTime display_time)
ImPlot::SetCurrentContext(plot_context);
if (last_display_time)
io.DeltaTime = std::min((display_time - last_display_time) * 1e-9f, 0.1f);
io.DeltaTime = std::min((display_time - last_display_time) * 1e-9f, 0.0166f);
last_display_time = display_time;
// Uses the window list from last frame
@@ -741,7 +741,10 @@ void imgui_context::new_frame(XrTime display_time)
io.AddMousePosEvent(position->x, position->y);
if (glm::length(scroll) > constants::gui::scroll_value_thd)
io.AddMouseWheelEvent(scroll.x, scroll.y);
{
io.MouseWheel = scroll.y;
io.MouseWheelH = scroll.x;
}
}
}