diff --git a/ChocolArm64/Optimizations.cs b/ChocolArm64/Optimizations.cs index 48d22fb3c7..cbb8131f5c 100644 --- a/ChocolArm64/Optimizations.cs +++ b/ChocolArm64/Optimizations.cs @@ -2,7 +2,7 @@ using System.Runtime.Intrinsics.X86; public static class Optimizations { - public static bool AssumeStrictAbiCompliance { get; set; } = true; + public static bool AssumeStrictAbiCompliance { get; set; } public static bool FastFP { get; set; } = true; diff --git a/Ryujinx/Config.jsonc b/Ryujinx/Config.jsonc index 8b5ebe0328..6e808b56fd 100644 --- a/Ryujinx/Config.jsonc +++ b/Ryujinx/Config.jsonc @@ -29,18 +29,21 @@ // System Language list: https://gist.github.com/HorrorTroll/b6e4a88d774c3c9b3bdf54d79a7ca43b "system_language": "AmericanEnglish", - // Enable or Disable Docked Mode + // Enable or disable Docked Mode "docked_mode": false, - - // Enable or Disable Game Vsync + + // Enable or disable Game Vsync "enable_vsync": true, - - // Enable or Disable Multi-core scheduling of threads + + // Enable or disable Multi-core scheduling of threads "enable_multicore_scheduling": true, - + // Enable integrity checks on Switch content files "enable_fs_integrity_checks": true, - + + // Enable or disable aggressive CPU optimizations + "enable_aggressive_cpu_opts": true, + // The primary controller's type // Supported Values: Handheld, ProController, NpadPair, NpadLeft, NpadRight "controller_type": "Handheld", diff --git a/Ryujinx/Configuration.cs b/Ryujinx/Configuration.cs index dbbec1cbc6..c4a1b4369f 100644 --- a/Ryujinx/Configuration.cs +++ b/Ryujinx/Configuration.cs @@ -86,6 +86,11 @@ namespace Ryujinx /// public bool EnableFsIntegrityChecks { get; private set; } + /// + /// Enable or Disable aggressive CPU optimizations + /// + public bool EnableAggressiveCpuOpts { get; private set; } + /// /// The primary controller's type /// @@ -197,6 +202,11 @@ namespace Ryujinx ? IntegrityCheckLevel.ErrorOnInvalid : IntegrityCheckLevel.None; + if (Instance.EnableAggressiveCpuOpts) + { + Optimizations.AssumeStrictAbiCompliance = true; + } + if(Instance.GamepadControls.Enabled) { if (GamePad.GetName(Instance.GamepadControls.Index) == "Unmapped Controller") diff --git a/Ryujinx/_schema.json b/Ryujinx/_schema.json index 0e586671d6..923a915d2e 100644 --- a/Ryujinx/_schema.json +++ b/Ryujinx/_schema.json @@ -399,6 +399,17 @@ false ] }, + "enable_aggressive_cpu_opts": { + "$id": "#/properties/enable_aggressive_cpu_opts", + "type": "boolean", + "title": "Enable Aggressive CPU Optimizations", + "description": "Enable or disable aggressive CPU optimizations", + "default": true, + "examples": [ + true, + false + ] + }, "controller_type": { "$id": "#/properties/controller_type", "type": "string",