Add the player select applet. #537
@ -1,3 +1,4 @@
|
|||||||
|
using Ryujinx.Common;
|
||||||
using Ryujinx.Common.Logging;
|
using Ryujinx.Common.Logging;
|
||||||
using Ryujinx.Common.Memory;
|
using Ryujinx.Common.Memory;
|
||||||
using Ryujinx.HLE.HOS.Services.Account.Acc;
|
using Ryujinx.HLE.HOS.Services.Account.Acc;
|
||||||
@ -29,7 +30,15 @@ namespace Ryujinx.HLE.HOS.Applets
|
|||||||
_interactiveSession = interactiveSession;
|
_interactiveSession = interactiveSession;
|
||||||
|
|
||||||
UserProfile selected = _system.Device.UIHandler.ShowPlayerSelectDialog();
|
UserProfile selected = _system.Device.UIHandler.ShowPlayerSelectDialog();
|
||||||
|
if (selected.UserId == new UserId("00000000000000000000000000000080"))
|
||||||
|
{
|
||||||
|
_normalSession.Push(BuildGuestResponse());
|
||||||
|
Logger.Info?.Print(LogClass.Service,$"[Player Select] Guest Selected");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
_normalSession.Push(BuildResponse(selected));
|
_normalSession.Push(BuildResponse(selected));
|
||||||
|
}
|
||||||
AppletStateChanged?.Invoke(this, null);
|
AppletStateChanged?.Invoke(this, null);
|
||||||
|
|
||||||
_system.ReturnFocus();
|
_system.ReturnFocus();
|
||||||
@ -48,5 +57,15 @@ namespace Ryujinx.HLE.HOS.Applets
|
|||||||
|
|
||||||
return stream.ToArray();
|
return stream.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private byte[] BuildGuestResponse()
|
||||||
|
{
|
||||||
|
using MemoryStream stream = MemoryStreamManager.Shared.GetStream();
|
||||||
|
using BinaryWriter writer = new(stream);
|
||||||
|
|
||||||
|
writer.Write(new byte());
|
||||||
|
|
||||||
|
return stream.ToArray();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -576,7 +576,7 @@ namespace Ryujinx.Headless
|
|||||||
|
|
||||||
public UserProfile ShowPlayerSelectDialog()
|
public UserProfile ShowPlayerSelectDialog()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
return AccountSaveDataManager.GetLastUsedUser();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user