mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-09-19 14:18:51 +02:00
d7310d7a1c
This fixes an error from #3805 that caused a wrong conversion of ``AppKeyValueStorage`` to string. As that information isn't really relevant without appropriate parsing, it was removed from ``ToString``. This should get ride of "bell warning" in Mario Kart 8 when entering Time Trials.
34 lines
No EOL
1.1 KiB
C#
34 lines
No EOL
1.1 KiB
C#
using Ryujinx.Common.Memory;
|
|
using Ryujinx.HLE.HOS.Services.Account.Acc;
|
|
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace Ryujinx.HLE.HOS.Services.Friend.ServiceCreator.FriendService
|
|
{
|
|
[StructLayout(LayoutKind.Sequential, Pack = 0x8)]
|
|
struct UserPresence
|
|
{
|
|
public UserId UserId;
|
|
public long LastTimeOnlineTimestamp;
|
|
public PresenceStatus Status;
|
|
|
|
[MarshalAs(UnmanagedType.I1)]
|
|
public bool SamePresenceGroupApplication;
|
|
|
|
public Array3<byte> Unknown;
|
|
private AppKeyValueStorageHolder _appKeyValueStorage;
|
|
|
|
public Span<byte> AppKeyValueStorage => MemoryMarshal.Cast<AppKeyValueStorageHolder, byte>(MemoryMarshal.CreateSpan(ref _appKeyValueStorage, AppKeyValueStorageHolder.Size));
|
|
|
|
[StructLayout(LayoutKind.Sequential, Pack = 0x1, Size = Size)]
|
|
private struct AppKeyValueStorageHolder
|
|
{
|
|
public const int Size = 0xC0;
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return $"UserPresence {{ UserId: {UserId}, LastTimeOnlineTimestamp: {LastTimeOnlineTimestamp}, Status: {Status} }}";
|
|
}
|
|
}
|
|
} |