Oops accidently overwrote the amiibo owner name
This commit is contained in:
parent
462e0cdd80
commit
d3c0600066
@ -688,7 +688,8 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp
|
||||
{
|
||||
RegisterInfo registerInfo = VirtualAmiibo.GetRegisterInfo(
|
||||
context.Device.System.TickSource,
|
||||
context.Device.System.NfpDevices[i].AmiiboId);
|
||||
context.Device.System.NfpDevices[i].AmiiboId,
|
||||
context.Device.System.AccountManager.LastOpenedUser.Name);
|
||||
|
||||
context.Memory.Write(outputPosition, registerInfo);
|
||||
|
||||
|
@ -64,7 +64,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp
|
||||
};
|
||||
}
|
||||
|
||||
public static RegisterInfo GetRegisterInfo(ITickSource tickSource, string amiiboId)
|
||||
public static RegisterInfo GetRegisterInfo(ITickSource tickSource, string amiiboId, string userName)
|
||||
{
|
||||
VirtualAmiiboFile amiiboFile = LoadAmiiboFile(amiiboId);
|
||||
string nickname = "Ryujinx";
|
||||
@ -77,7 +77,8 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp
|
||||
|
||||
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()
|
||||
{
|
||||
@ -89,7 +90,7 @@ 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());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user