aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXpl0itR <xpl0itr@outlook.com>2020-03-30 22:39:46 +0100
committerGitHub <noreply@github.com>2020-03-31 08:39:46 +1100
commit6a7b58e2565915b1dc63a121939572af8f7ba5e7 (patch)
tree107791c1e75c6b81ad8791ae3792b6e16c190bef
parent12d49c37d219950ccb22c3979ecb0b34262a7155 (diff)
Add warning with an option to disable for settings that impact performance (#1002)
* Add warning and option to disable when loading game with debug logs * Add warning and option to disable when shader dumping is enabled * Edit text and add title
-rw-r--r--Ryujinx/Ui/MainWindow.cs36
1 files changed, 36 insertions, 0 deletions
diff --git a/Ryujinx/Ui/MainWindow.cs b/Ryujinx/Ui/MainWindow.cs
index 16438ecc..094f6ff5 100644
--- a/Ryujinx/Ui/MainWindow.cs
+++ b/Ryujinx/Ui/MainWindow.cs
@@ -303,6 +303,42 @@ namespace Ryujinx.Ui
}
else
{
+ if (ConfigurationState.Instance.Logger.EnableDebug.Value)
+ {
+ MessageDialog debugWarningDialog = new MessageDialog(this, DialogFlags.Modal, MessageType.Warning, ButtonsType.YesNo, null)
+ {
+ Title = "Ryujinx - Warning",
+ Text = "You have debug logging enabled, which is designed to be used by developers only.",
+ SecondaryText = "For optimal performance, it's recommended to disable debug logging. Would you like to disable debug logging now?"
+ };
+
+ if (debugWarningDialog.Run() == (int)ResponseType.Yes)
+ {
+ ConfigurationState.Instance.Logger.EnableDebug.Value = false;
+ SaveConfig();
+ }
+
+ debugWarningDialog.Dispose();
+ }
+
+ if (!string.IsNullOrWhiteSpace(ConfigurationState.Instance.Graphics.ShadersDumpPath.Value))
+ {
+ MessageDialog shadersDumpWarningDialog = new MessageDialog(this, DialogFlags.Modal, MessageType.Warning, ButtonsType.YesNo, null)
+ {
+ Title = "Ryujinx - Warning",
+ Text = "You have shader dumping enabled, which is designed to be used by developers only.",
+ SecondaryText = "For optimal performance, it's recommended to disable shader dumping. Would you like to disable shader dumping now?"
+ };
+
+ if (shadersDumpWarningDialog.Run() == (int)ResponseType.Yes)
+ {
+ ConfigurationState.Instance.Graphics.ShadersDumpPath.Value = "";
+ SaveConfig();
+ }
+
+ shadersDumpWarningDialog.Dispose();
+ }
+
Logger.RestartTime();
HLE.Switch device = InitializeSwitchInstance();