aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMary <me@thog.eu>2021-11-30 11:09:32 +0100
committerGitHub <noreply@github.com>2021-11-30 11:09:32 +0100
commit7c9360d39353db38a8b5c5ff9c52924a577f089e (patch)
tree67b357740d034db8c02b70b572a3341581e60569
parent560ed5eebda0c8e54c3c029a9bf54000e52a2933 (diff)
Fix Amiibo hanging since .NET 6 changes (#2890)
The .NET 6 changes ended up causing a difference in the way we deserialise and would end up deserializing wrongly. This commit fixes it by resoring previous behaviour while still fixing the illink warning that caused that change in the first place
-rw-r--r--Ryujinx.HLE/HOS/Services/Nfc/Nfp/VirtualAmiibo.cs3
1 files changed, 1 insertions, 2 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/VirtualAmiibo.cs b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/VirtualAmiibo.cs
index 3eb88950..35aeade0 100644
--- a/Ryujinx.HLE/HOS/Services/Nfc/Nfp/VirtualAmiibo.cs
+++ b/Ryujinx.HLE/HOS/Services/Nfc/Nfp/VirtualAmiibo.cs
@@ -1,6 +1,5 @@
using Ryujinx.Common.Configuration;
using Ryujinx.Common.Memory;
-using Ryujinx.Common.Utilities;
using Ryujinx.HLE.HOS.Services.Mii;
using Ryujinx.HLE.HOS.Services.Mii.Types;
using Ryujinx.HLE.HOS.Services.Nfc.Nfp.NfpManager;
@@ -173,7 +172,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp
if (File.Exists(filePath))
{
- virtualAmiiboFile = JsonHelper.DeserializeFromFile<VirtualAmiiboFile>(filePath);
+ virtualAmiiboFile = JsonSerializer.Deserialize<VirtualAmiiboFile>(File.ReadAllText(filePath), new JsonSerializerOptions(JsonSerializerDefaults.General));
}
else
{