From 0fdc773f271506358d959364c0aa68c8d977c7be Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Sat, 6 May 2023 17:41:43 -0500 Subject: [PATCH] Make debug logs optional (#523) --- RetroBar/App.config | 3 +++ RetroBar/Languages/English.xaml | 1 + RetroBar/Properties/Settings.Designer.cs | 12 ++++++++++++ RetroBar/Properties/Settings.settings | 3 +++ RetroBar/PropertiesWindow.xaml | 4 ++++ RetroBar/Utilities/ManagedShellLogger.cs | 18 ++++++++++++++++-- RetroBar/Utilities/Settings.cs | 15 +++++++++++++++ 7 files changed, 54 insertions(+), 2 deletions(-) diff --git a/RetroBar/App.config b/RetroBar/App.config index 0b19189b..48285ad7 100644 --- a/RetroBar/App.config +++ b/RetroBar/App.config @@ -64,6 +64,9 @@ 1 + + False + \ No newline at end of file diff --git a/RetroBar/Languages/English.xaml b/RetroBar/Languages/English.xaml index 09ec90a0..68894474 100644 --- a/RetroBar/Languages/English.xaml +++ b/RetroBar/Languages/English.xaml @@ -45,6 +45,7 @@ 100% 200% Current setting: {0}% + Enable debug logging OK Customize Notifications diff --git a/RetroBar/Properties/Settings.Designer.cs b/RetroBar/Properties/Settings.Designer.cs index 751c38cf..12f7914d 100644 --- a/RetroBar/Properties/Settings.Designer.cs +++ b/RetroBar/Properties/Settings.Designer.cs @@ -251,5 +251,17 @@ public double TaskbarScale { this["TaskbarScale"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("False")] + public bool DebugLogging { + get { + return ((bool)(this["DebugLogging"])); + } + set { + this["DebugLogging"] = value; + } + } } } diff --git a/RetroBar/Properties/Settings.settings b/RetroBar/Properties/Settings.settings index 042c1d52..f761ebc3 100644 --- a/RetroBar/Properties/Settings.settings +++ b/RetroBar/Properties/Settings.settings @@ -59,5 +59,8 @@ 1 + + False + \ No newline at end of file diff --git a/RetroBar/PropertiesWindow.xaml b/RetroBar/PropertiesWindow.xaml index 0b24db9e..17ae3bc3 100644 --- a/RetroBar/PropertiesWindow.xaml +++ b/RetroBar/PropertiesWindow.xaml @@ -295,6 +295,10 @@ IsChecked="{Binding Source={x:Static Settings:Settings.Instance}, Path=UseSoftwareRendering, UpdateSourceTrigger=PropertyChanged}">