misc: prevent crashes
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
VerticalAlignment="Center"
|
||||
Text="Xenoblade Chronicles 2 Menu Softlock Fix" />
|
||||
</StackPanel>
|
||||
<!--<Separator/>
|
||||
<Separator/>
|
||||
<StackPanel
|
||||
Margin="0,10,0,0"
|
||||
Orientation="Horizontal"
|
||||
@@ -68,7 +68,7 @@
|
||||
VerticalAlignment="Center"
|
||||
Minimum="1"
|
||||
Maximum="1000" />
|
||||
<Separator/>-->
|
||||
<Separator/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</ScrollViewer>
|
||||
|
||||
@@ -752,7 +752,7 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
||||
Hacks.ShowDirtyHacks.Value = configurationFileFormat.ShowDirtyHacks;
|
||||
|
||||
{
|
||||
EnabledDirtyHack[] hacks = configurationFileFormat.DirtyHacks.Select(EnabledDirtyHack.FromPacked).ToArray();
|
||||
EnabledDirtyHack[] hacks = (configurationFileFormat.DirtyHacks ?? []).Select(EnabledDirtyHack.FromPacked).ToArray();
|
||||
|
||||
Hacks.Xc2MenuSoftlockFix.Value = hacks.Any(it => it.Hack == DirtyHacks.Xc2MenuSoftlockFix);
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ using Ryujinx.Common.Logging;
|
||||
using Ryujinx.HLE;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using RyuLogger = Ryujinx.Common.Logging.Logger;
|
||||
|
||||
namespace Ryujinx.Ava.Utilities.Configuration
|
||||
{
|
||||
@@ -644,9 +645,20 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
||||
|
||||
private void HackChanged(object sender, ReactiveEventArgs<bool> rxe)
|
||||
{
|
||||
Ryujinx.Common.Logging.Logger.Info?.Print(LogClass.Configuration, $"EnabledDirtyHacks set to: [{EnabledHacks.Select(x => x.Hack).JoinToString(", ")}]", "LogValueChange");
|
||||
var newHacks = EnabledHacks.Select(x => x.Hack)
|
||||
.JoinToString(", ");
|
||||
|
||||
if (newHacks != _lastHackCollection)
|
||||
{
|
||||
RyuLogger.Info?.Print(LogClass.Configuration,
|
||||
$"EnabledDirtyHacks set to: [{_lastHackCollection}]", "LogValueChange");
|
||||
|
||||
_lastHackCollection = newHacks;
|
||||
}
|
||||
}
|
||||
|
||||
private static string _lastHackCollection;
|
||||
|
||||
public EnabledDirtyHack[] EnabledHacks
|
||||
{
|
||||
get
|
||||
|
||||
Reference in New Issue
Block a user