mirror of
https://github.com/Ryubing/Ryujinx.git
synced 2025-03-15 06:54:47 +00:00
HLE: optional hack: disable IsAnyInternetRequestAccepted
Some checks failed
Canary release job / Release for linux-arm64 (push) Failing after 56s
Canary release job / Release for linux-x64 (push) Failing after 1m4s
Canary release job / Create tag (push) Has been cancelled
Canary release job / Release for win-x64 (push) Has been cancelled
Canary release job / Release MacOS universal (push) Has been cancelled
Some checks failed
Canary release job / Release for linux-arm64 (push) Failing after 56s
Canary release job / Release for linux-x64 (push) Failing after 1m4s
Canary release job / Create tag (push) Has been cancelled
Canary release job / Release for win-x64 (push) Has been cancelled
Canary release job / Release MacOS universal (push) Has been cancelled
This commit is contained in:
parent
44632e5d8b
commit
0db85d0aa9
8 changed files with 39 additions and 18 deletions
|
@ -9,7 +9,8 @@ namespace Ryujinx.Common.Configuration
|
||||||
public enum DirtyHack : byte
|
public enum DirtyHack : byte
|
||||||
{
|
{
|
||||||
Xc2MenuSoftlockFix = 1,
|
Xc2MenuSoftlockFix = 1,
|
||||||
ShaderTranslationDelay = 2
|
// ShaderTranslationDelay = 2
|
||||||
|
NifmServiceDisableIsAnyInternetRequestAccepted = 3
|
||||||
}
|
}
|
||||||
|
|
||||||
public readonly struct EnabledDirtyHack(DirtyHack hack, int value)
|
public readonly struct EnabledDirtyHack(DirtyHack hack, int value)
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace Ryujinx.HLE.HOS.Services.Nifm
|
||||||
// CreateGeneralServiceOld() -> object<nn::nifm::detail::IGeneralService>
|
// CreateGeneralServiceOld() -> object<nn::nifm::detail::IGeneralService>
|
||||||
public ResultCode CreateGeneralServiceOld(ServiceCtx context)
|
public ResultCode CreateGeneralServiceOld(ServiceCtx context)
|
||||||
{
|
{
|
||||||
MakeObject(context, new IGeneralService());
|
MakeObject(context, new IGeneralService(context));
|
||||||
|
|
||||||
return ResultCode.Success;
|
return ResultCode.Success;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ namespace Ryujinx.HLE.HOS.Services.Nifm
|
||||||
// CreateGeneralService(u64, pid) -> object<nn::nifm::detail::IGeneralService>
|
// CreateGeneralService(u64, pid) -> object<nn::nifm::detail::IGeneralService>
|
||||||
public ResultCode CreateGeneralService(ServiceCtx context)
|
public ResultCode CreateGeneralService(ServiceCtx context)
|
||||||
{
|
{
|
||||||
MakeObject(context, new IGeneralService());
|
MakeObject(context, new IGeneralService(context));
|
||||||
|
|
||||||
return ResultCode.Success;
|
return ResultCode.Success;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using Ryujinx.Common;
|
using Ryujinx.Common;
|
||||||
|
using Ryujinx.Common.Configuration;
|
||||||
using Ryujinx.Common.Logging;
|
using Ryujinx.Common.Logging;
|
||||||
using Ryujinx.Common.Utilities;
|
using Ryujinx.Common.Utilities;
|
||||||
using Ryujinx.HLE.HOS.Services.Nifm.StaticService.GeneralService;
|
using Ryujinx.HLE.HOS.Services.Nifm.StaticService.GeneralService;
|
||||||
|
@ -17,12 +18,12 @@ namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService
|
||||||
private UnicastIPAddressInformation _targetAddressInfoCache = null;
|
private UnicastIPAddressInformation _targetAddressInfoCache = null;
|
||||||
private string _cacheChosenInterface = null;
|
private string _cacheChosenInterface = null;
|
||||||
|
|
||||||
public IGeneralService()
|
public IGeneralService(ServiceCtx context)
|
||||||
{
|
{
|
||||||
_generalServiceDetail = new GeneralServiceDetail
|
_generalServiceDetail = new GeneralServiceDetail
|
||||||
{
|
{
|
||||||
ClientId = GeneralServiceManager.Count,
|
ClientId = GeneralServiceManager.Count,
|
||||||
IsAnyInternetRequestAccepted = true, // NOTE: Why not accept any internet request?
|
IsAnyInternetRequestAccepted = !context.Device.DirtyHacks.IsEnabled(DirtyHack.NifmServiceDisableIsAnyInternetRequestAccepted), // NOTE: Why not accept any internet request?
|
||||||
};
|
};
|
||||||
|
|
||||||
NetworkChange.NetworkAddressChanged += LocalInterfaceCacheHandler;
|
NetworkChange.NetworkAddressChanged += LocalInterfaceCacheHandler;
|
||||||
|
|
|
@ -161,8 +161,6 @@ namespace Ryujinx.Ava.Systems.Configuration
|
||||||
|
|
||||||
Hacks.Xc2MenuSoftlockFix.Value = hacks.IsEnabled(DirtyHack.Xc2MenuSoftlockFix);
|
Hacks.Xc2MenuSoftlockFix.Value = hacks.IsEnabled(DirtyHack.Xc2MenuSoftlockFix);
|
||||||
|
|
||||||
Hacks.EnableShaderTranslationDelay.Value = hacks.IsEnabled(DirtyHack.ShaderTranslationDelay);
|
|
||||||
Hacks.ShaderTranslationDelay.Value = hacks[DirtyHack.ShaderTranslationDelay].CoerceAtLeast(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (configurationFileUpdated)
|
if (configurationFileUpdated)
|
||||||
|
|
|
@ -683,18 +683,15 @@ namespace Ryujinx.Ava.Systems.Configuration
|
||||||
|
|
||||||
public ReactiveObject<bool> Xc2MenuSoftlockFix { get; private set; }
|
public ReactiveObject<bool> Xc2MenuSoftlockFix { get; private set; }
|
||||||
|
|
||||||
public ReactiveObject<bool> EnableShaderTranslationDelay { get; private set; }
|
public ReactiveObject<bool> DisableNifmIsAnyInternetRequestAccepted { get; private set; }
|
||||||
|
|
||||||
public ReactiveObject<int> ShaderTranslationDelay { get; private set; }
|
|
||||||
|
|
||||||
public HacksSection()
|
public HacksSection()
|
||||||
{
|
{
|
||||||
ShowDirtyHacks = new ReactiveObject<bool>();
|
ShowDirtyHacks = new ReactiveObject<bool>();
|
||||||
Xc2MenuSoftlockFix = new ReactiveObject<bool>();
|
Xc2MenuSoftlockFix = new ReactiveObject<bool>();
|
||||||
Xc2MenuSoftlockFix.Event += HackChanged;
|
Xc2MenuSoftlockFix.Event += HackChanged;
|
||||||
EnableShaderTranslationDelay = new ReactiveObject<bool>();
|
DisableNifmIsAnyInternetRequestAccepted = new ReactiveObject<bool>();
|
||||||
EnableShaderTranslationDelay.Event += HackChanged;
|
DisableNifmIsAnyInternetRequestAccepted.Event += HackChanged;
|
||||||
ShaderTranslationDelay = new ReactiveObject<int>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HackChanged(object sender, ReactiveEventArgs<bool> rxe)
|
private void HackChanged(object sender, ReactiveEventArgs<bool> rxe)
|
||||||
|
@ -725,8 +722,8 @@ namespace Ryujinx.Ava.Systems.Configuration
|
||||||
if (Xc2MenuSoftlockFix)
|
if (Xc2MenuSoftlockFix)
|
||||||
Apply(DirtyHack.Xc2MenuSoftlockFix);
|
Apply(DirtyHack.Xc2MenuSoftlockFix);
|
||||||
|
|
||||||
if (EnableShaderTranslationDelay)
|
if (DisableNifmIsAnyInternetRequestAccepted)
|
||||||
Apply(DirtyHack.ShaderTranslationDelay, ShaderTranslationDelay);
|
Apply(DirtyHack.NifmServiceDisableIsAnyInternetRequestAccepted);
|
||||||
|
|
||||||
return enabledHacks.ToArray();
|
return enabledHacks.ToArray();
|
||||||
|
|
||||||
|
|
|
@ -16,11 +16,12 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
}
|
}
|
||||||
|
|
||||||
[ObservableProperty] private bool _xc2MenuSoftlockFix = ConfigurationState.Instance.Hacks.Xc2MenuSoftlockFix;
|
[ObservableProperty] private bool _xc2MenuSoftlockFix = ConfigurationState.Instance.Hacks.Xc2MenuSoftlockFix;
|
||||||
|
[ObservableProperty] private bool _nifmDisableIsAnyInternetRequestAccepted = ConfigurationState.Instance.Hacks.DisableNifmIsAnyInternetRequestAccepted;
|
||||||
|
|
||||||
public static string Xc2MenuFixTooltip { get; } = Lambda.String(sb =>
|
public static string Xc2MenuFixTooltip { get; } = Lambda.String(sb =>
|
||||||
{
|
{
|
||||||
sb.AppendLine(
|
sb.AppendLine(
|
||||||
"This fix applies a 2ms delay (via 'Thread.Sleep(2)') every time the game tries to read data from the emulated Switch filesystem.")
|
"This hack applies a 2ms delay (via 'Thread.Sleep(2)') every time the game tries to read data from the emulated Switch filesystem.")
|
||||||
.AppendLine();
|
.AppendLine();
|
||||||
|
|
||||||
sb.AppendLine("From the issue on GitHub:").AppendLine();
|
sb.AppendLine("From the issue on GitHub:").AppendLine();
|
||||||
|
@ -29,5 +30,14 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
"there is a low chance that the game will softlock, " +
|
"there is a low chance that the game will softlock, " +
|
||||||
"the submenu won't show up, while background music is still there.");
|
"the submenu won't show up, while background music is still there.");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
public static string NifmDisableIsAnyInternetRequestAcceptedTooltip { get; } = Lambda.String(sb =>
|
||||||
|
{
|
||||||
|
sb.AppendLine(
|
||||||
|
"This hack simply sets 'IsAnyInternetRequestAccepted' to 'false' when initializing the Nifm IGeneralService.")
|
||||||
|
.AppendLine();
|
||||||
|
|
||||||
|
sb.Append("Lets DOOM 2016 go in game.");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -757,6 +757,8 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
|
|
||||||
// Dirty Hacks
|
// Dirty Hacks
|
||||||
config.Hacks.Xc2MenuSoftlockFix.Value = DirtyHacks.Xc2MenuSoftlockFix;
|
config.Hacks.Xc2MenuSoftlockFix.Value = DirtyHacks.Xc2MenuSoftlockFix;
|
||||||
|
config.Hacks.DisableNifmIsAnyInternetRequestAccepted.Value =
|
||||||
|
DirtyHacks.NifmDisableIsAnyInternetRequestAccepted;
|
||||||
|
|
||||||
config.ToFileFormat().SaveConfig(Program.ConfigurationPath);
|
config.ToFileFormat().SaveConfig(Program.ConfigurationPath);
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Foreground="{DynamicResource SecondaryTextColor}"
|
Foreground="{DynamicResource SecondaryTextColor}"
|
||||||
TextDecorations="Underline"
|
TextDecorations="Underline"
|
||||||
Text="Highly specific hacks & tricks to alleviate performance issues, crashing, or freezing. Will cause issues." />
|
Text="Highly specific hacks & tricks to alleviate performance issues, crashing, or freezing. Can cause issues." />
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Margin="0,10,0,0"
|
Margin="0,10,0,0"
|
||||||
Orientation="Horizontal"
|
Orientation="Horizontal"
|
||||||
|
@ -43,6 +43,18 @@
|
||||||
Text="Xenoblade Chronicles 2 Menu Softlock Fix" />
|
Text="Xenoblade Chronicles 2 Menu Softlock Fix" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Separator/>
|
<Separator/>
|
||||||
|
<StackPanel
|
||||||
|
Margin="0,10,0,0"
|
||||||
|
Orientation="Horizontal"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
ToolTip.Tip="{Binding DirtyHacks.NifmDisableIsAnyInternetRequestAcceptedTooltip}">
|
||||||
|
<CheckBox
|
||||||
|
Margin="0"
|
||||||
|
IsChecked="{Binding DirtyHacks.NifmDisableIsAnyInternetRequestAccepted}"/>
|
||||||
|
<TextBlock
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Text="Disable IsAnyInternetRequestAccepted" />
|
||||||
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
|
Loading…
Add table
Reference in a new issue