mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-11-26 03:55:15 +00:00
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
This commit is contained in:
parent
12d49c37d2
commit
6a7b58e256
1 changed files with 36 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue