mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 14:44:34 +00:00
Display memory limit in notification area.
This commit is contained in:
parent
5f0cac546b
commit
b64389ba15
@ -997,6 +997,18 @@ bool View::DrawImpl()
|
|||||||
dx = ImGui::GetCursorPosX() - cx;
|
dx = ImGui::GetCursorPosX() - cx;
|
||||||
if( dx < targetLabelSize ) ImGui::SameLine( cx + targetLabelSize );
|
if( dx < targetLabelSize ) ImGui::SameLine( cx + targetLabelSize );
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
|
|
||||||
|
if( m_worker.GetMemoryLimit() > 0 )
|
||||||
|
{
|
||||||
|
ImGui::SameLine();
|
||||||
|
TextColoredUnformatted( 0xFF00FFFF, ICON_FA_TRIANGLE_EXCLAMATION );
|
||||||
|
if( ImGui::IsItemHovered() )
|
||||||
|
{
|
||||||
|
ImGui::BeginTooltip();
|
||||||
|
ImGui::Text( "Memory limit: %s", MemSizeToString( m_worker.GetMemoryLimit() ) );
|
||||||
|
ImGui::EndTooltip();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
DrawNotificationArea();
|
DrawNotificationArea();
|
||||||
|
|
||||||
|
@ -643,6 +643,7 @@ public:
|
|||||||
void Shutdown() { m_shutdown.store( true, std::memory_order_relaxed ); }
|
void Shutdown() { m_shutdown.store( true, std::memory_order_relaxed ); }
|
||||||
void Disconnect();
|
void Disconnect();
|
||||||
bool WasDisconnectIssued() const { return m_disconnect; }
|
bool WasDisconnectIssued() const { return m_disconnect; }
|
||||||
|
int64_t GetMemoryLimit() const { return m_memoryLimit; }
|
||||||
|
|
||||||
void Write( FileWrite& f, bool fiDict );
|
void Write( FileWrite& f, bool fiDict );
|
||||||
int GetTraceVersion() const { return m_traceVersion; }
|
int GetTraceVersion() const { return m_traceVersion; }
|
||||||
|
Loading…
Reference in New Issue
Block a user