From 6d0d12ce78dcf9521735a46a23c19280a15685fc Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 1 Aug 2020 12:03:11 +0200 Subject: [PATCH] Remove unneeded parameter. --- server/TracyMouse.cpp | 4 ++-- server/TracyMouse.hpp | 4 ++-- server/TracyView.cpp | 14 +++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/server/TracyMouse.cpp b/server/TracyMouse.cpp index 3e2df5f7..b756e1c5 100644 --- a/server/TracyMouse.cpp +++ b/server/TracyMouse.cpp @@ -38,12 +38,12 @@ bool IsMouseClicked( ImGuiMouseButton button ) return s_mouse.mouseClicked[button]; } -bool IsMouseDragging( ImGuiMouseButton button, float lock_threshold ) +bool IsMouseDragging( ImGuiMouseButton button ) { return s_mouse.mouseDragging[button]; } -ImVec2 GetMouseDragDelta( ImGuiMouseButton button, float lock_threshold ) +ImVec2 GetMouseDragDelta( ImGuiMouseButton button ) { return s_mouse.mouseDragDelta[button]; } diff --git a/server/TracyMouse.hpp b/server/TracyMouse.hpp index 34657d21..ea62d62d 100644 --- a/server/TracyMouse.hpp +++ b/server/TracyMouse.hpp @@ -10,8 +10,8 @@ void MouseFrame(); bool IsMouseDown( ImGuiMouseButton button ); bool IsMouseClicked( ImGuiMouseButton button ); -bool IsMouseDragging( ImGuiMouseButton button, float lock_threshold = -1.f ); -ImVec2 GetMouseDragDelta( ImGuiMouseButton button, float lock_threshold = -1.f ); +bool IsMouseDragging( ImGuiMouseButton button ); +ImVec2 GetMouseDragDelta( ImGuiMouseButton button ); } diff --git a/server/TracyView.cpp b/server/TracyView.cpp index c366cf6a..ae9f1e53 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -1376,10 +1376,10 @@ void View::DrawFrames() if( hover ) { - if( IsMouseDragging( 1, 0 ) ) + if( IsMouseDragging( 1 ) ) { m_pause = true; - const auto delta = GetMouseDragDelta( 1, 0 ).x; + const auto delta = GetMouseDragDelta( 1 ).x; if( abs( delta ) >= fwidth ) { const auto d = (int)delta / fwidth; @@ -1817,7 +1817,7 @@ void View::HandleZoneViewMouse( int64_t timespan, const ImVec2& wpos, float w, d m_highlight.active = true; m_highlight.start = m_highlight.end = m_vd.zvStart + ( io.MousePos.x - wpos.x ) * nspx; } - else if( IsMouseDragging( 0, 0 ) ) + else if( IsMouseDragging( 0 ) ) { m_highlight.end = m_vd.zvStart + ( io.MousePos.x - wpos.x ) * nspx; } @@ -1843,7 +1843,7 @@ void View::HandleZoneViewMouse( int64_t timespan, const ImVec2& wpos, float w, d m_highlightZoom.active = true; m_highlightZoom.start = m_highlightZoom.end = m_vd.zvStart + ( io.MousePos.x - wpos.x ) * nspx; } - else if( IsMouseDragging( 2, 0 ) ) + else if( IsMouseDragging( 2 ) ) { m_highlightZoom.end = m_vd.zvStart + ( io.MousePos.x - wpos.x ) * nspx; } @@ -1885,12 +1885,12 @@ void View::HandleZoneViewMouse( int64_t timespan, const ImVec2& wpos, float w, d } const auto hwheel_delta = io.MouseWheelH * 100.f; - if( IsMouseDragging( 1, 0 ) || hwheel_delta != 0 ) + if( IsMouseDragging( 1 ) || hwheel_delta != 0 ) { m_pause = true; m_zoomAnim.active = false; if( !m_playback.pause && m_playback.sync ) m_playback.pause = true; - const auto delta = GetMouseDragDelta( 1, 0 ); + const auto delta = GetMouseDragDelta( 1 ); const auto dpx = int64_t( (delta.x * nspx) + (hwheel_delta * nspx)); if( dpx != 0 ) { @@ -10014,7 +10014,7 @@ void View::DrawFindZone() m_findZone.hlOrig_t0 = t0; m_findZone.hlOrig_t1 = t1; } - else if( IsMouseDragging( 0, 0 ) ) + else if( IsMouseDragging( 0 ) ) { if( t0 < m_findZone.hlOrig_t0 ) {