mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Restrict mem events list size.
This commit is contained in:
parent
867fc6a0cf
commit
7d32ef8c8b
@ -4586,7 +4586,11 @@ void View::DrawStatistics()
|
|||||||
template<class T>
|
template<class T>
|
||||||
void View::ListMemData( T ptr, T end, std::function<const MemEvent*(T&)> DrawAddress )
|
void View::ListMemData( T ptr, T end, std::function<const MemEvent*(T&)> DrawAddress )
|
||||||
{
|
{
|
||||||
ImGui::BeginChild( "##memScroll", ImVec2( 0, std::max( 200.f, ImGui::GetContentRegionAvail().y ) ) );
|
const auto& style = ImGui::GetStyle();
|
||||||
|
const auto dist = std::distance( ptr, end ) + 1;
|
||||||
|
const auto ty = ImGui::GetTextLineHeight() + style.ItemSpacing.y;
|
||||||
|
|
||||||
|
ImGui::BeginChild( "##memScroll", ImVec2( 0, std::max( ty * std::min<int64_t>( dist, 5 ), std::min( ty * dist, ImGui::GetContentRegionAvail().y ) ) ) );
|
||||||
ImGui::Columns( 7 );
|
ImGui::Columns( 7 );
|
||||||
ImGui::Text( "Address" );
|
ImGui::Text( "Address" );
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user