mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-26 06:59:15 +00:00
@@ -26,7 +26,6 @@ namespace Ryujinx.HLE.HOS.Services.Time.Clock
|
||||
public byte Type;
|
||||
public ushort Unknown;
|
||||
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1, Size = Size)]
|
||||
private struct LocationNameStorageHolder
|
||||
{
|
||||
|
||||
@@ -2,7 +2,6 @@ using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Services.Time
|
||||
{
|
||||
[SuppressMessage("Design", "CA1069: Enums values should not be duplicated")]
|
||||
public enum ResultCode
|
||||
{
|
||||
ModuleId = 116,
|
||||
|
||||
@@ -222,7 +222,6 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
|
||||
{
|
||||
seconds = 0;
|
||||
|
||||
|
||||
bool isValid = GetNum(name, ref namePosition, out int num, 0, HoursPerDays * DaysPerWeek - 1);
|
||||
if (!isValid)
|
||||
{
|
||||
@@ -264,6 +263,7 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
|
||||
seconds += num;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -486,7 +486,7 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
|
||||
return false;
|
||||
}
|
||||
|
||||
if (name[namePosition] != '\0' && name[namePosition] != ',' && name[namePosition] != ';')
|
||||
if (name[namePosition] is not (byte)'\0' and not (byte)',' and not (byte)';')
|
||||
{
|
||||
bool isValid = GetOffset(name.ToArray(), ref namePosition, ref dstOffset);
|
||||
|
||||
@@ -506,7 +506,7 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
|
||||
namePosition = 0;
|
||||
}
|
||||
|
||||
if (name[namePosition] == ',' || name[namePosition] == ';')
|
||||
if (name[namePosition] is (byte)',' or (byte)';')
|
||||
{
|
||||
namePosition++;
|
||||
|
||||
@@ -744,6 +744,7 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
|
||||
{
|
||||
outRules.Chars[charsPosition + i] = destName[i];
|
||||
}
|
||||
|
||||
outRules.Chars[charsPosition + destLen] = 0;
|
||||
}
|
||||
|
||||
@@ -763,6 +764,7 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
|
||||
{
|
||||
value += SecondsPerDay;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case RuleType.DayOfYear:
|
||||
@@ -923,7 +925,6 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (streamLength < (timeCount * TimeTypeSize
|
||||
+ timeCount
|
||||
+ typeCount * 6
|
||||
@@ -1051,7 +1052,6 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
|
||||
outRules.Ttis[i].IsGMT = p[0] != 0;
|
||||
p = p[1..];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
long position = (workBuffer.Length - p.Length);
|
||||
@@ -1554,7 +1554,7 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
|
||||
|
||||
int savedSeconds;
|
||||
|
||||
if (calendarTime.Second >= 0 && calendarTime.Second < SecondsPerMinute)
|
||||
if (calendarTime.Second is >= 0 and < SecondsPerMinute)
|
||||
{
|
||||
savedSeconds = 0;
|
||||
}
|
||||
|
||||
@@ -152,7 +152,6 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
|
||||
|
||||
TimeZone.ParseTimeZoneBinary(ref tzRule, tzif.Get.AsStream());
|
||||
|
||||
|
||||
TimeTypeInfo ttInfo;
|
||||
if (tzRule.TimeCount > 0) // Find the current transition period
|
||||
{
|
||||
@@ -164,6 +163,7 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
|
||||
fin = i;
|
||||
}
|
||||
}
|
||||
|
||||
ttInfo = tzRule.Ttis[tzRule.Types[fin]];
|
||||
}
|
||||
else if (tzRule.TypeCount >= 1) // Otherwise, use the first offset in TTInfo
|
||||
|
||||
Reference in New Issue
Block a user