diff options
| author | Xpl0itR <xpl0itr@outlook.com> | 2020-03-30 22:38:52 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-31 08:38:52 +1100 |
| commit | 12d49c37d219950ccb22c3979ecb0b34262a7155 (patch) | |
| tree | ac6e73776a332e833d0f59d1b72f281eaff07098 /Ryujinx.Common/Configuration | |
| parent | 5a52ca5071425e3f9600576679bec609e7cead89 (diff) | |
Make max anisotropy configurable (#1043)
* Make max anisotropy configurable
* Move opengl command to opengl project
* Add GUI option
Diffstat (limited to 'Ryujinx.Common/Configuration')
| -rw-r--r-- | Ryujinx.Common/Configuration/ConfigurationFileFormat.cs | 7 | ||||
| -rw-r--r-- | Ryujinx.Common/Configuration/ConfigurationState.cs | 18 |
2 files changed, 24 insertions, 1 deletions
diff --git a/Ryujinx.Common/Configuration/ConfigurationFileFormat.cs b/Ryujinx.Common/Configuration/ConfigurationFileFormat.cs index e4cd63d6..9123f044 100644 --- a/Ryujinx.Common/Configuration/ConfigurationFileFormat.cs +++ b/Ryujinx.Common/Configuration/ConfigurationFileFormat.cs @@ -19,11 +19,16 @@ namespace Ryujinx.Configuration /// <summary> /// The current version of the file format /// </summary> - public const int CurrentVersion = 3; + public const int CurrentVersion = 4; public int Version { get; set; } /// <summary> + /// Max Anisotropy. Values range from 0 - 16. Set to -1 to let the game decide. + /// </summary> + public float MaxAnisotropy { get; set; } + + /// <summary> /// Dumps shaders in this local directory /// </summary> public string GraphicsShadersDumpPath { get; set; } diff --git a/Ryujinx.Common/Configuration/ConfigurationState.cs b/Ryujinx.Common/Configuration/ConfigurationState.cs index e563008a..67628aa1 100644 --- a/Ryujinx.Common/Configuration/ConfigurationState.cs +++ b/Ryujinx.Common/Configuration/ConfigurationState.cs @@ -236,6 +236,11 @@ namespace Ryujinx.Configuration public class GraphicsSection { /// <summary> + /// Max Anisotropy. Values range from 0 - 16. Set to -1 to let the game decide. + /// </summary> + public ReactiveObject<float> MaxAnisotropy { get; private set; } + + /// <summary> /// Dumps shaders in this local directory /// </summary> public ReactiveObject<string> ShadersDumpPath { get; private set; } @@ -247,6 +252,7 @@ namespace Ryujinx.Configuration public GraphicsSection() { + MaxAnisotropy = new ReactiveObject<float>(); ShadersDumpPath = new ReactiveObject<string>(); EnableVsync = new ReactiveObject<bool>(); } @@ -302,6 +308,7 @@ namespace Ryujinx.Configuration ConfigurationFileFormat configurationFile = new ConfigurationFileFormat { Version = ConfigurationFileFormat.CurrentVersion, + MaxAnisotropy = Graphics.MaxAnisotropy, GraphicsShadersDumpPath = Graphics.ShadersDumpPath, LoggingEnableDebug = Logger.EnableDebug, LoggingEnableStub = Logger.EnableStub, @@ -349,6 +356,7 @@ namespace Ryujinx.Configuration public void LoadDefault() { + Graphics.MaxAnisotropy.Value = -1; Graphics.ShadersDumpPath.Value = ""; Logger.EnableDebug.Value = false; Logger.EnableStub.Value = true; @@ -487,6 +495,16 @@ namespace Ryujinx.Configuration configurationFileUpdated = true; } + if (configurationFileFormat.Version < 4) + { + Common.Logging.Logger.PrintWarning(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 4."); + + configurationFileFormat.MaxAnisotropy = -1; + + configurationFileUpdated = true; + } + + Graphics.MaxAnisotropy.Value = configurationFileFormat.MaxAnisotropy; Graphics.ShadersDumpPath.Value = configurationFileFormat.GraphicsShadersDumpPath; Logger.EnableDebug.Value = configurationFileFormat.LoggingEnableDebug; Logger.EnableStub.Value = configurationFileFormat.LoggingEnableStub; |
