mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-10 20:56:39 +00:00
Nickname! - Init Amiibos with Profile's name! (#2804)
* Remove comment from code. * Added needed RegisterInfo for TODO. * Forgot to add two words... * Stop being tired and fixed the one issue. * Removing suggested line from GDKchan. * GDK seems to have been incorrect? * Update Ryujinx.HLE/HOS/Services/Nfc/Nfp/VirtualAmiibo.cs Co-authored-by: gdkchan <gab.dark.100@gmail.com> Co-authored-by: gdkchan <gab.dark.100@gmail.com>
This commit is contained in:
parent
b9d83cc97e
commit
02d786a086
2 changed files with 5 additions and 7 deletions
|
@ -688,7 +688,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp
|
|||
{
|
||||
if (context.Device.System.NfpDevices[i].State == NfpDeviceState.TagMounted)
|
||||
{
|
||||
RegisterInfo registerInfo = VirtualAmiibo.GetRegisterInfo(context.Device.System.NfpDevices[i].AmiiboId);
|
||||
RegisterInfo registerInfo = VirtualAmiibo.GetRegisterInfo(context.Device.System.NfpDevices[i].AmiiboId, context.Device.System.AccountManager.LastOpenedUser.Name);
|
||||
|
||||
context.Memory.Write(outputPosition, registerInfo);
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp
|
|||
};
|
||||
}
|
||||
|
||||
public static RegisterInfo GetRegisterInfo(string amiiboId)
|
||||
public static RegisterInfo GetRegisterInfo(string amiiboId, string nickname)
|
||||
{
|
||||
VirtualAmiiboFile amiiboFile = LoadAmiiboFile(amiiboId);
|
||||
|
||||
|
@ -72,8 +72,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp
|
|||
|
||||
charInfo.SetFromStoreData(StoreData.BuildDefault(utilityImpl, 0));
|
||||
|
||||
// TODO: Maybe change the "no name" by the player name when user profile will be implemented.
|
||||
// charInfo.Nickname = Nickname.FromString("Nickname");
|
||||
charInfo.Nickname = Nickname.FromString(nickname);
|
||||
|
||||
RegisterInfo registerInfo = new RegisterInfo()
|
||||
{
|
||||
|
@ -85,7 +84,6 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp
|
|||
Reserved1 = new Array64<byte>(),
|
||||
Reserved2 = new Array58<byte>()
|
||||
};
|
||||
|
||||
Encoding.ASCII.GetBytes("Ryujinx").CopyTo(registerInfo.Nickname.ToSpan());
|
||||
|
||||
return registerInfo;
|
||||
|
|
Loading…
Reference in a new issue