From 12d49c37d219950ccb22c3979ecb0b34262a7155 Mon Sep 17 00:00:00 2001 From: Xpl0itR Date: Mon, 30 Mar 2020 22:38:52 +0100 Subject: Make max anisotropy configurable (#1043) * Make max anisotropy configurable * Move opengl command to opengl project * Add GUI option --- Ryujinx.Common/Configuration/ConfigurationState.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Ryujinx.Common/Configuration/ConfigurationState.cs') 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 @@ -235,6 +235,11 @@ namespace Ryujinx.Configuration /// public class GraphicsSection { + /// + /// Max Anisotropy. Values range from 0 - 16. Set to -1 to let the game decide. + /// + public ReactiveObject MaxAnisotropy { get; private set; } + /// /// Dumps shaders in this local directory /// @@ -247,6 +252,7 @@ namespace Ryujinx.Configuration public GraphicsSection() { + MaxAnisotropy = new ReactiveObject(); ShadersDumpPath = new ReactiveObject(); EnableVsync = new ReactiveObject(); } @@ -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; -- cgit v1.2.3