mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-29 16:54:35 +00:00
Accumulate drag offset if time delta is less than 1 ns.
This commit is contained in:
parent
7b3a0057ca
commit
21fd14397d
@ -755,10 +755,14 @@ void View::DrawZones()
|
|||||||
m_pause = true;
|
m_pause = true;
|
||||||
const auto delta = ImGui::GetMouseDragDelta( 1, 0 ).x;
|
const auto delta = ImGui::GetMouseDragDelta( 1, 0 ).x;
|
||||||
const auto nspx = double( timespan ) / w;
|
const auto nspx = double( timespan ) / w;
|
||||||
m_zvStart -= int64_t( delta * nspx );
|
const auto dpx = int64_t( delta * nspx );
|
||||||
m_zvEnd -= int64_t( delta * nspx );
|
if( dpx != 0 )
|
||||||
|
{
|
||||||
|
m_zvStart -= dpx;
|
||||||
|
m_zvEnd -= dpx;
|
||||||
io.MouseClickedPos[1].x = io.MousePos.x;
|
io.MouseClickedPos[1].x = io.MousePos.x;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const auto wheel = io.MouseWheel;
|
const auto wheel = io.MouseWheel;
|
||||||
if( wheel != 0 )
|
if( wheel != 0 )
|
||||||
|
Loading…
Reference in New Issue
Block a user