Added working guest user

This commit is contained in:
Jacobwasbeast 2025-01-18 16:46:15 -06:00
parent 2fad3f9863
commit d0b45244d3
2 changed files with 21 additions and 2 deletions

View File

@ -1,3 +1,4 @@
using Ryujinx.Common;
using Ryujinx.Common.Logging;
using Ryujinx.Common.Memory;
using Ryujinx.HLE.HOS.Services.Account.Acc;
@ -29,7 +30,15 @@ namespace Ryujinx.HLE.HOS.Applets
_interactiveSession = interactiveSession;
UserProfile selected = _system.Device.UIHandler.ShowPlayerSelectDialog();
_normalSession.Push(BuildResponse(selected));
if (selected.UserId == new UserId("00000000000000000000000000000080"))
{
_normalSession.Push(BuildGuestResponse());
Logger.Info?.Print(LogClass.Service,$"[Player Select] Guest Selected");
}
else
{
_normalSession.Push(BuildResponse(selected));
}
AppletStateChanged?.Invoke(this, null);
_system.ReturnFocus();
@ -48,5 +57,15 @@ namespace Ryujinx.HLE.HOS.Applets
return stream.ToArray();
}
private byte[] BuildGuestResponse()
{
using MemoryStream stream = MemoryStreamManager.Shared.GetStream();
using BinaryWriter writer = new(stream);
writer.Write(new byte());
return stream.ToArray();
}
}
}

View File

@ -576,7 +576,7 @@ namespace Ryujinx.Headless
public UserProfile ShowPlayerSelectDialog()
{
throw new NotImplementedException();
return AccountSaveDataManager.GetLastUsedUser();
}
}
}