mirror of
https://github.com/Ryubing/Ryujinx.git
synced 2025-03-10 09:04:23 +00:00
HLE: optional hack: disable IsAnyInternetRequestAccepted
This commit is contained in:
parent
44632e5d8b
commit
0db85d0aa9
@ -9,7 +9,8 @@ namespace Ryujinx.Common.Configuration
|
||||
public enum DirtyHack : byte
|
||||
{
|
||||
Xc2MenuSoftlockFix = 1,
|
||||
ShaderTranslationDelay = 2
|
||||
// ShaderTranslationDelay = 2
|
||||
NifmServiceDisableIsAnyInternetRequestAccepted = 3
|
||||
}
|
||||
|
||||
public readonly struct EnabledDirtyHack(DirtyHack hack, int value)
|
||||
|
@ -13,7 +13,7 @@ namespace Ryujinx.HLE.HOS.Services.Nifm
|
||||
// CreateGeneralServiceOld() -> object<nn::nifm::detail::IGeneralService>
|
||||
public ResultCode CreateGeneralServiceOld(ServiceCtx context)
|
||||
{
|
||||
MakeObject(context, new IGeneralService());
|
||||
MakeObject(context, new IGeneralService(context));
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
@ -22,7 +22,7 @@ namespace Ryujinx.HLE.HOS.Services.Nifm
|
||||
// CreateGeneralService(u64, pid) -> object<nn::nifm::detail::IGeneralService>
|
||||
public ResultCode CreateGeneralService(ServiceCtx context)
|
||||
{
|
||||
MakeObject(context, new IGeneralService());
|
||||
MakeObject(context, new IGeneralService(context));
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
using Ryujinx.Common;
|
||||
using Ryujinx.Common.Configuration;
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.Common.Utilities;
|
||||
using Ryujinx.HLE.HOS.Services.Nifm.StaticService.GeneralService;
|
||||
@ -17,12 +18,12 @@ namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService
|
||||
private UnicastIPAddressInformation _targetAddressInfoCache = null;
|
||||
private string _cacheChosenInterface = null;
|
||||
|
||||
public IGeneralService()
|
||||
public IGeneralService(ServiceCtx context)
|
||||
{
|
||||
_generalServiceDetail = new GeneralServiceDetail
|
||||
{
|
||||
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;
|
||||
|
@ -161,8 +161,6 @@ namespace Ryujinx.Ava.Systems.Configuration
|
||||
|
||||
Hacks.Xc2MenuSoftlockFix.Value = hacks.IsEnabled(DirtyHack.Xc2MenuSoftlockFix);
|
||||
|
||||
Hacks.EnableShaderTranslationDelay.Value = hacks.IsEnabled(DirtyHack.ShaderTranslationDelay);
|
||||
Hacks.ShaderTranslationDelay.Value = hacks[DirtyHack.ShaderTranslationDelay].CoerceAtLeast(0);
|
||||
}
|
||||
|
||||
if (configurationFileUpdated)
|
||||
|
@ -683,18 +683,15 @@ namespace Ryujinx.Ava.Systems.Configuration
|
||||
|
||||
public ReactiveObject<bool> Xc2MenuSoftlockFix { get; private set; }
|
||||
|
||||
public ReactiveObject<bool> EnableShaderTranslationDelay { get; private set; }
|
||||
|
||||
public ReactiveObject<int> ShaderTranslationDelay { get; private set; }
|
||||
public ReactiveObject<bool> DisableNifmIsAnyInternetRequestAccepted { get; private set; }
|
||||
|
||||
public HacksSection()
|
||||
{
|
||||
ShowDirtyHacks = new ReactiveObject<bool>();
|
||||
Xc2MenuSoftlockFix = new ReactiveObject<bool>();
|
||||
Xc2MenuSoftlockFix.Event += HackChanged;
|
||||
EnableShaderTranslationDelay = new ReactiveObject<bool>();
|
||||
EnableShaderTranslationDelay.Event += HackChanged;
|
||||
ShaderTranslationDelay = new ReactiveObject<int>();
|
||||
DisableNifmIsAnyInternetRequestAccepted = new ReactiveObject<bool>();
|
||||
DisableNifmIsAnyInternetRequestAccepted.Event += HackChanged;
|
||||
}
|
||||
|
||||
private void HackChanged(object sender, ReactiveEventArgs<bool> rxe)
|
||||
@ -725,8 +722,8 @@ namespace Ryujinx.Ava.Systems.Configuration
|
||||
if (Xc2MenuSoftlockFix)
|
||||
Apply(DirtyHack.Xc2MenuSoftlockFix);
|
||||
|
||||
if (EnableShaderTranslationDelay)
|
||||
Apply(DirtyHack.ShaderTranslationDelay, ShaderTranslationDelay);
|
||||
if (DisableNifmIsAnyInternetRequestAccepted)
|
||||
Apply(DirtyHack.NifmServiceDisableIsAnyInternetRequestAccepted);
|
||||
|
||||
return enabledHacks.ToArray();
|
||||
|
||||
|
@ -16,11 +16,12 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
}
|
||||
|
||||
[ObservableProperty] private bool _xc2MenuSoftlockFix = ConfigurationState.Instance.Hacks.Xc2MenuSoftlockFix;
|
||||
[ObservableProperty] private bool _nifmDisableIsAnyInternetRequestAccepted = ConfigurationState.Instance.Hacks.DisableNifmIsAnyInternetRequestAccepted;
|
||||
|
||||
public static string Xc2MenuFixTooltip { get; } = Lambda.String(sb =>
|
||||
{
|
||||
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();
|
||||
|
||||
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, " +
|
||||
"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
|
||||
config.Hacks.Xc2MenuSoftlockFix.Value = DirtyHacks.Xc2MenuSoftlockFix;
|
||||
config.Hacks.DisableNifmIsAnyInternetRequestAccepted.Value =
|
||||
DirtyHacks.NifmDisableIsAnyInternetRequestAccepted;
|
||||
|
||||
config.ToFileFormat().SaveConfig(Program.ConfigurationPath);
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
<TextBlock
|
||||
Foreground="{DynamicResource SecondaryTextColor}"
|
||||
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
|
||||
Margin="0,10,0,0"
|
||||
Orientation="Horizontal"
|
||||
@ -43,6 +43,18 @@
|
||||
Text="Xenoblade Chronicles 2 Menu Softlock Fix" />
|
||||
</StackPanel>
|
||||
<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>
|
||||
</Border>
|
||||
</ScrollViewer>
|
||||
|
Loading…
x
Reference in New Issue
Block a user