mirror of
https://github.com/wolfpld/tracy.git
synced 2026-10-24 09:40:53 +00:00
Merge pull request #1250 from YaLTeR/fix-scrolling
Fix scrolling speed for touchpads and high-res wheels on Wayland
This commit is contained in:
@@ -338,8 +338,8 @@ static void PointerFrame( void*, struct wl_pointer* pointer )
|
||||
if( s_wheel )
|
||||
{
|
||||
s_wheel = false;
|
||||
s_wheelAxisX /= 8;
|
||||
s_wheelAxisY /= 8;
|
||||
s_wheelAxisX /= 15;
|
||||
s_wheelAxisY /= 15;
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
io.AddMouseWheelEvent( wl_fixed_to_double( s_wheelAxisX ), wl_fixed_to_double( s_wheelAxisY ) );
|
||||
s_wheelAxisX = s_wheelAxisY = 0;
|
||||
|
||||
@@ -145,6 +145,7 @@ void View::HandleTimelineMouse( int64_t timespan, const ImVec2& wpos, float w )
|
||||
else if( io.KeyShift ) mod = 0.5;
|
||||
|
||||
mod *= m_verticalScrollMultiplier;
|
||||
mod *= fabs( wheel );
|
||||
|
||||
if( wheel > 0 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user