mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2025-01-09 14:41:59 +00:00
misc: cleanup applying the current dirty hacks to the config upon loading the json
This commit is contained in:
parent
b6f88514f9
commit
172869bfba
1 changed files with 7 additions and 9 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
using Gommon;
|
||||||
using Ryujinx.Ava.Utilities.Configuration.System;
|
using Ryujinx.Ava.Utilities.Configuration.System;
|
||||||
using Ryujinx.Ava.Utilities.Configuration.UI;
|
using Ryujinx.Ava.Utilities.Configuration.UI;
|
||||||
using Ryujinx.Common.Configuration;
|
using Ryujinx.Common.Configuration;
|
||||||
|
@ -9,7 +10,6 @@ using Ryujinx.Common.Logging;
|
||||||
using Ryujinx.HLE;
|
using Ryujinx.HLE;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
namespace Ryujinx.Ava.Utilities.Configuration
|
namespace Ryujinx.Ava.Utilities.Configuration
|
||||||
{
|
{
|
||||||
|
@ -752,14 +752,12 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
||||||
Hacks.ShowDirtyHacks.Value = configurationFileFormat.ShowDirtyHacks;
|
Hacks.ShowDirtyHacks.Value = configurationFileFormat.ShowDirtyHacks;
|
||||||
|
|
||||||
{
|
{
|
||||||
EnabledDirtyHack[] hacks = (configurationFileFormat.DirtyHacks ?? []).Select(EnabledDirtyHack.Unpack).ToArray();
|
DirtyHackCollection hacks = new (configurationFileFormat.DirtyHacks ?? []);
|
||||||
|
|
||||||
Hacks.Xc2MenuSoftlockFix.Value = hacks.Any(it => it.Hack == DirtyHacks.Xc2MenuSoftlockFix);
|
Hacks.Xc2MenuSoftlockFix.Value = hacks.IsEnabled(DirtyHacks.Xc2MenuSoftlockFix);
|
||||||
|
|
||||||
var shaderCompilationThreadSleep = hacks.FirstOrDefault(it =>
|
Hacks.EnableShaderTranslationDelay.Value = hacks.IsEnabled(DirtyHacks.ShaderCompilationThreadSleep);
|
||||||
it.Hack == DirtyHacks.ShaderCompilationThreadSleep);
|
Hacks.ShaderTranslationDelay.Value = hacks[DirtyHacks.ShaderCompilationThreadSleep].CoerceAtLeast(0);
|
||||||
Hacks.EnableShaderTranslationDelay.Value = shaderCompilationThreadSleep != null;
|
|
||||||
Hacks.ShaderTranslationDelay.Value = shaderCompilationThreadSleep?.Value ?? 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (configurationFileUpdated)
|
if (configurationFileUpdated)
|
||||||
|
|
Loading…
Reference in a new issue