mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2025-08-30 07:25:05 +00:00
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
3 changed files with 11 additions and 5 deletions
|
|
@ -688,8 +688,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp
|
||||||
{
|
{
|
||||||
RegisterInfo registerInfo = VirtualAmiibo.GetRegisterInfo(
|
RegisterInfo registerInfo = VirtualAmiibo.GetRegisterInfo(
|
||||||
context.Device.System.TickSource,
|
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);
|
context.Memory.Write(outputPosition, registerInfo);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.NfpManager
|
||||||
public uint FileVersion { get; set; }
|
public uint FileVersion { get; set; }
|
||||||
public byte[] TagUuid { get; set; }
|
public byte[] TagUuid { get; set; }
|
||||||
public string AmiiboId { get; set; }
|
public string AmiiboId { get; set; }
|
||||||
|
public string NickName { get; set; }
|
||||||
public DateTime FirstWriteDate { get; set; }
|
public DateTime FirstWriteDate { get; set; }
|
||||||
public DateTime LastWriteDate { get; set; }
|
public DateTime LastWriteDate { get; set; }
|
||||||
public ushort WriteCounter { 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);
|
VirtualAmiiboFile amiiboFile = LoadAmiiboFile(amiiboId);
|
||||||
|
string nickname = "Ryujinx";
|
||||||
|
if (amiiboFile.NickName != null)
|
||||||
|
{
|
||||||
|
nickname = amiiboFile.NickName;
|
||||||
|
}
|
||||||
UtilityImpl utilityImpl = new(tickSource);
|
UtilityImpl utilityImpl = new(tickSource);
|
||||||
CharInfo charInfo = new();
|
CharInfo charInfo = new();
|
||||||
|
|
||||||
|
|
@ -85,7 +89,9 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp
|
||||||
Reserved1 = new Array64<byte>(),
|
Reserved1 = new Array64<byte>(),
|
||||||
Reserved2 = new Array58<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;
|
return registerInfo;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue