From ea66bd2e67472290946ff05374cc705e0f1b7d89 Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Sat, 4 Feb 2023 15:38:57 +0100 Subject: [PATCH] Allow Profiling in Release for now. --- OtterGui | 2 +- Penumbra/Penumbra.csproj | 1 + Penumbra/UI/ConfigWindow.DebugTab.cs | 11 +++++++---- Penumbra/UI/ConfigWindow.cs | 1 + 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/OtterGui b/OtterGui index aee8a3dc..407aa485 160000 --- a/OtterGui +++ b/OtterGui @@ -1 +1 @@ -Subproject commit aee8a3dc8e7eb1145c328a7c50f7e5bbcdd234f8 +Subproject commit 407aa4857ead69a03793a62b889452529c9bc572 diff --git a/Penumbra/Penumbra.csproj b/Penumbra/Penumbra.csproj index 8006457b..a97d1d90 100644 --- a/Penumbra/Penumbra.csproj +++ b/Penumbra/Penumbra.csproj @@ -20,6 +20,7 @@ $(MSBuildWarningsAsMessages);MSB3277 + PROFILING; diff --git a/Penumbra/UI/ConfigWindow.DebugTab.cs b/Penumbra/UI/ConfigWindow.DebugTab.cs index 19ada144..b800d3c8 100644 --- a/Penumbra/UI/ConfigWindow.DebugTab.cs +++ b/Penumbra/UI/ConfigWindow.DebugTab.cs @@ -116,17 +116,20 @@ public partial class ConfigWindow PrintValue( "Web Server Enabled", ( _window._penumbra.WebServer != null ).ToString() ); } - [Conditional( "DEBUG" )] private static void DrawPerformanceTab() { ImGui.NewLine(); - if( !ImGui.CollapsingHeader( "Performance" ) ) + if( ImGui.CollapsingHeader( "Performance" ) ) { return; } - Penumbra.StartTimer.Draw( "##startTimer", TimingExtensions.ToName ); - ImGui.NewLine(); + using( var start = TreeNode( "Startup Performance", ImGuiTreeNodeFlags.DefaultOpen ) ) + { + Penumbra.StartTimer.Draw( "##startTimer", TimingExtensions.ToName ); + ImGui.NewLine(); + } + Penumbra.Performance.Draw( "##performance", "Enable Runtime Performance Tracking", TimingExtensions.ToName ); } diff --git a/Penumbra/UI/ConfigWindow.cs b/Penumbra/UI/ConfigWindow.cs index e861ccec..99646b21 100644 --- a/Penumbra/UI/ConfigWindow.cs +++ b/Penumbra/UI/ConfigWindow.cs @@ -27,6 +27,7 @@ public sealed partial class ConfigWindow : Window, IDisposable { _penumbra = penumbra; _settingsTab = new SettingsTab( this ); + _selector = new ModFileSystemSelector( _penumbra.ModFileSystem ); _modPanel = new ModPanel( this ); _selector.SelectionChanged += _modPanel.OnSelectionChange;