0
0
Fork 0
mirror of https://github.com/ryujinx-mirror/ryujinx.git synced 2024-10-19 16:21:40 +00:00
ryujinx-fork/Ryujinx.HLE/HOS/Services/Time/TimeZone/Types/TimeTypeInfo.cs
Mary 2382717600
timezone: Fix regression caused by #3361 (#3418)
Because of that PR, TimeZoneRule was bigger than 0x4000 thanks to a
misuse of a constant.

This commit address this issue and add a new unit test to ensure the size of
TimeZoneRule is 0x4000 bytes.

Also address suggestions that were lost on the original PR.
2022-06-24 21:11:56 +02:00

28 lines
No EOL
640 B
C#

using Ryujinx.Common.Memory;
using System.Runtime.InteropServices;
namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
{
[StructLayout(LayoutKind.Sequential, Size = Size, Pack = 4)]
public struct TimeTypeInfo
{
public const int Size = 0x10;
public int GmtOffset;
[MarshalAs(UnmanagedType.I1)]
public bool IsDaySavingTime;
public Array3<byte> Padding1;
public int AbbreviationListIndex;
[MarshalAs(UnmanagedType.I1)]
public bool IsStandardTimeDaylight;
[MarshalAs(UnmanagedType.I1)]
public bool IsGMT;
public ushort Padding2;
}
}