mirror of
https://github.com/GreemDev/Ryujinx
synced 2024-12-11 10:39:58 +01:00
ea14a95524
* Fix inconsistencies with UserId The account user id isn't an UUID. This PR adds a new UserId type with the correct value ordering to avoid mismatch with LibHac's Uid. This also fix an hardcoded value of the UserId. As the userid has been invalid for quite some time (and to avoid forcing users to their recreate saves), the userid has been changed to "00000000000000010000000000000000". Also implement a stub for IApplicationFunctions::GetSaveDataSize. (see the sources for the reason) Fix #626 * Address jd's & Ac_k's comments
27 lines
802 B
C#
27 lines
802 B
C#
using Ryujinx.HLE.HOS.Services.Account.Acc;
|
|
using System.IO;
|
|
|
|
namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.Storage
|
|
{
|
|
class StorageHelper
|
|
{
|
|
private const uint LaunchParamsMagic = 0xc79497ca;
|
|
|
|
public static byte[] MakeLaunchParams(UserProfile userProfile)
|
|
{
|
|
// Size needs to be at least 0x88 bytes otherwise application errors.
|
|
using (MemoryStream ms = new MemoryStream())
|
|
{
|
|
BinaryWriter writer = new BinaryWriter(ms);
|
|
|
|
ms.SetLength(0x88);
|
|
|
|
writer.Write(LaunchParamsMagic);
|
|
writer.Write(1); // IsAccountSelected? Only lower 8 bits actually used.
|
|
userProfile.UserId.Write(writer);
|
|
|
|
return ms.ToArray();
|
|
}
|
|
}
|
|
}
|
|
}
|