Merge branch 'GreemDev:master' into master
This commit is contained in:
commit
267aaca87d
@ -8,6 +8,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.NfpManager
|
||||
public uint FileVersion { get; set; }
|
||||
public byte[] TagUuid { get; set; }
|
||||
public string AmiiboId { get; set; }
|
||||
public string NickName { get; set; }
|
||||
public DateTime FirstWriteDate { get; set; }
|
||||
public DateTime LastWriteDate { get; set; }
|
||||
public ushort WriteCounter { get; set; }
|
||||
|
@ -64,16 +64,17 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp
|
||||
};
|
||||
}
|
||||
|
||||
public static RegisterInfo GetRegisterInfo(ITickSource tickSource, string amiiboId, string nickname)
|
||||
public static RegisterInfo GetRegisterInfo(ITickSource tickSource, string amiiboId, string userName)
|
||||
{
|
||||
VirtualAmiiboFile amiiboFile = LoadAmiiboFile(amiiboId);
|
||||
|
||||
string nickname = amiiboFile.NickName ?? "Ryujinx";
|
||||
UtilityImpl utilityImpl = new(tickSource);
|
||||
CharInfo charInfo = new();
|
||||
|
||||
charInfo.SetFromStoreData(StoreData.BuildDefault(utilityImpl, 0));
|
||||
|
||||
charInfo.Nickname = Nickname.FromString(nickname);
|
||||
// This is the player's name
|
||||
charInfo.Nickname = Nickname.FromString(userName);
|
||||
|
||||
RegisterInfo registerInfo = new()
|
||||
{
|
||||
@ -85,7 +86,9 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp
|
||||
Reserved1 = new Array64<byte>(),
|
||||
Reserved2 = new Array58<byte>(),
|
||||
};
|
||||
"Ryujinx"u8.CopyTo(registerInfo.Nickname.AsSpan());
|
||||
// This is the amiibo's name
|
||||
byte[] nicknameBytes = System.Text.Encoding.UTF8.GetBytes(nickname);
|
||||
nicknameBytes.CopyTo(registerInfo.Nickname.AsSpan());
|
||||
|
||||
return registerInfo;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user