aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Common/Configuration
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Common/Configuration')
-rw-r--r--Ryujinx.Common/Configuration/ConfigurationFileFormat.cs8
-rw-r--r--Ryujinx.Common/Configuration/ConfigurationState.cs37
-rw-r--r--Ryujinx.Common/Configuration/GraphicsDebugLevel.cs10
3 files changed, 45 insertions, 10 deletions
diff --git a/Ryujinx.Common/Configuration/ConfigurationFileFormat.cs b/Ryujinx.Common/Configuration/ConfigurationFileFormat.cs
index 13dad62c..ae3fa493 100644
--- a/Ryujinx.Common/Configuration/ConfigurationFileFormat.cs
+++ b/Ryujinx.Common/Configuration/ConfigurationFileFormat.cs
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.IO;
+using Ryujinx.Common.Configuration;
using Ryujinx.Common.Configuration.Hid;
using Ryujinx.Common.Logging;
using Ryujinx.Common.Utilities;
@@ -13,7 +14,7 @@ namespace Ryujinx.Configuration
/// <summary>
/// The current version of the file format
/// </summary>
- public const int CurrentVersion = 11;
+ public const int CurrentVersion = 12;
public int Version { get; set; }
@@ -78,6 +79,11 @@ namespace Ryujinx.Configuration
public LogClass[] LoggingFilteredClasses { get; set; }
/// <summary>
+ /// Change Graphics API debug log level
+ /// </summary>
+ public GraphicsDebugLevel LoggingGraphicsDebugLevel { get; set; }
+
+ /// <summary>
/// Enables or disables logging to a file on disk
/// </summary>
public bool EnableFileLog { get; set; }
diff --git a/Ryujinx.Common/Configuration/ConfigurationState.cs b/Ryujinx.Common/Configuration/ConfigurationState.cs
index 3149f250..dc9dd659 100644
--- a/Ryujinx.Common/Configuration/ConfigurationState.cs
+++ b/Ryujinx.Common/Configuration/ConfigurationState.cs
@@ -1,4 +1,5 @@
using Ryujinx.Common;
+using Ryujinx.Common.Configuration;
using Ryujinx.Common.Configuration.Hid;
using Ryujinx.Common.Logging;
using Ryujinx.Configuration.Hid;
@@ -141,17 +142,23 @@ namespace Ryujinx.Configuration
/// </summary>
public ReactiveObject<bool> EnableFileLog { get; private set; }
+ /// <summary>
+ /// Controls which OpenGL log messages are recorded in the log
+ /// </summary>
+ public ReactiveObject<GraphicsDebugLevel> GraphicsDebugLevel { get; private set; }
+
public LoggerSection()
{
- EnableDebug = new ReactiveObject<bool>();
- EnableStub = new ReactiveObject<bool>();
- EnableInfo = new ReactiveObject<bool>();
- EnableWarn = new ReactiveObject<bool>();
- EnableError = new ReactiveObject<bool>();
- EnableGuest = new ReactiveObject<bool>();
- EnableFsAccessLog = new ReactiveObject<bool>();
- FilteredClasses = new ReactiveObject<LogClass[]>();
- EnableFileLog = new ReactiveObject<bool>();
+ EnableDebug = new ReactiveObject<bool>();
+ EnableStub = new ReactiveObject<bool>();
+ EnableInfo = new ReactiveObject<bool>();
+ EnableWarn = new ReactiveObject<bool>();
+ EnableError = new ReactiveObject<bool>();
+ EnableGuest = new ReactiveObject<bool>();
+ EnableFsAccessLog = new ReactiveObject<bool>();
+ FilteredClasses = new ReactiveObject<LogClass[]>();
+ EnableFileLog = new ReactiveObject<bool>();
+ GraphicsDebugLevel = new ReactiveObject<GraphicsDebugLevel>();
}
}
@@ -378,6 +385,7 @@ namespace Ryujinx.Configuration
LoggingEnableGuest = Logger.EnableGuest,
LoggingEnableFsAccessLog = Logger.EnableFsAccessLog,
LoggingFilteredClasses = Logger.FilteredClasses,
+ LoggingGraphicsDebugLevel = Logger.GraphicsDebugLevel,
EnableFileLog = Logger.EnableFileLog,
SystemLanguage = System.Language,
SystemRegion = System.Region,
@@ -436,6 +444,7 @@ namespace Ryujinx.Configuration
Logger.EnableGuest.Value = true;
Logger.EnableFsAccessLog.Value = false;
Logger.FilteredClasses.Value = new LogClass[] { };
+ Logger.GraphicsDebugLevel.Value = GraphicsDebugLevel.None;
Logger.EnableFileLog.Value = true;
System.Language.Value = Language.AmericanEnglish;
System.Region.Value = Region.USA;
@@ -678,6 +687,15 @@ namespace Ryujinx.Configuration
configurationFileUpdated = true;
}
+ if (configurationFileFormat.Version < 12)
+ {
+ Common.Logging.Logger.PrintWarning(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 12.");
+
+ configurationFileFormat.LoggingGraphicsDebugLevel = GraphicsDebugLevel.None;
+
+ configurationFileUpdated = true;
+ }
+
List<InputConfig> inputConfig = new List<InputConfig>();
inputConfig.AddRange(configurationFileFormat.ControllerConfig);
inputConfig.AddRange(configurationFileFormat.KeyboardConfig);
@@ -694,6 +712,7 @@ namespace Ryujinx.Configuration
Logger.EnableGuest.Value = configurationFileFormat.LoggingEnableGuest;
Logger.EnableFsAccessLog.Value = configurationFileFormat.LoggingEnableFsAccessLog;
Logger.FilteredClasses.Value = configurationFileFormat.LoggingFilteredClasses;
+ Logger.GraphicsDebugLevel.Value = configurationFileFormat.LoggingGraphicsDebugLevel;
Logger.EnableFileLog.Value = configurationFileFormat.EnableFileLog;
System.Language.Value = configurationFileFormat.SystemLanguage;
System.Region.Value = configurationFileFormat.SystemRegion;
diff --git a/Ryujinx.Common/Configuration/GraphicsDebugLevel.cs b/Ryujinx.Common/Configuration/GraphicsDebugLevel.cs
new file mode 100644
index 00000000..1bef4a7e
--- /dev/null
+++ b/Ryujinx.Common/Configuration/GraphicsDebugLevel.cs
@@ -0,0 +1,10 @@
+namespace Ryujinx.Common.Configuration
+{
+ public enum GraphicsDebugLevel
+ {
+ None,
+ Error,
+ Performance,
+ All
+ }
+}