Added NickName to VirtualAmiiboFile
There is currently no way to change it besides changing the nickname variable inside system/amiibo
This commit is contained in:
parent
a7b58df3fe
commit
462e0cdd80
@ -688,8 +688,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp
|
||||
{
|
||||
RegisterInfo registerInfo = VirtualAmiibo.GetRegisterInfo(
|
||||
context.Device.System.TickSource,
|
||||
context.Device.System.NfpDevices[i].AmiiboId,
|
||||
context.Device.System.AccountManager.LastOpenedUser.Name);
|
||||
context.Device.System.NfpDevices[i].AmiiboId);
|
||||
|
||||
context.Memory.Write(outputPosition, registerInfo);
|
||||
|
||||
|
@ -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,10 +64,14 @@ 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)
|
||||
{
|
||||
VirtualAmiiboFile amiiboFile = LoadAmiiboFile(amiiboId);
|
||||
|
||||
string nickname = "Ryujinx";
|
||||
if (amiiboFile.NickName != null)
|
||||
{
|
||||
nickname = amiiboFile.NickName;
|
||||
}
|
||||
UtilityImpl utilityImpl = new(tickSource);
|
||||
CharInfo charInfo = new();
|
||||
|
||||
@ -85,7 +89,9 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp
|
||||
Reserved1 = new Array64<byte>(),
|
||||
Reserved2 = new Array58<byte>(),
|
||||
};
|
||||
"Ryujinx"u8.CopyTo(registerInfo.Nickname.AsSpan());
|
||||
//"Ryujinx"u8.CopyTo(registerInfo.Nickname.AsSpan());
|
||||
byte[] nicknameBytes = System.Text.Encoding.UTF8.GetBytes(nickname);
|
||||
nicknameBytes.CopyTo(registerInfo.Nickname.AsSpan());
|
||||
|
||||
return registerInfo;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user