diff options
Diffstat (limited to 'src/Ryujinx.HLE/HOS/Services/Sdb/Pdm/QueryService')
3 files changed, 12 insertions, 12 deletions
diff --git a/src/Ryujinx.HLE/HOS/Services/Sdb/Pdm/QueryService/QueryPlayStatisticsManager.cs b/src/Ryujinx.HLE/HOS/Services/Sdb/Pdm/QueryService/QueryPlayStatisticsManager.cs index 52a07d46..7017cc50 100644 --- a/src/Ryujinx.HLE/HOS/Services/Sdb/Pdm/QueryService/QueryPlayStatisticsManager.cs +++ b/src/Ryujinx.HLE/HOS/Services/Sdb/Pdm/QueryService/QueryPlayStatisticsManager.cs @@ -9,17 +9,17 @@ using System.Runtime.CompilerServices; namespace Ryujinx.HLE.HOS.Services.Sdb.Pdm.QueryService { - static class QueryPlayStatisticsManager + class QueryPlayStatisticsManager { - private static Dictionary<UserId, ApplicationPlayStatistics> applicationPlayStatistics = new Dictionary<UserId, ApplicationPlayStatistics>(); + private static readonly Dictionary<UserId, ApplicationPlayStatistics> _applicationPlayStatistics = new(); internal static ResultCode GetPlayStatistics(ServiceCtx context, bool byUserId = false) { ulong inputPosition = context.Request.SendBuff[0].Position; - ulong inputSize = context.Request.SendBuff[0].Size; + ulong inputSize = context.Request.SendBuff[0].Size; ulong outputPosition = context.Request.ReceiveBuff[0].Position; - ulong outputSize = context.Request.ReceiveBuff[0].Size; + ulong outputSize = context.Request.ReceiveBuff[0].Size; UserId userId = byUserId ? context.RequestData.ReadStruct<UserId>() : new UserId(); @@ -33,7 +33,7 @@ namespace Ryujinx.HLE.HOS.Services.Sdb.Pdm.QueryService PlayLogQueryCapability queryCapability = (PlayLogQueryCapability)context.Device.Processes.ActiveApplication.ApplicationControlProperties.PlayLogQueryCapability; - List<ulong> titleIds = new List<ulong>(); + List<ulong> titleIds = new(); for (ulong i = 0; i < inputSize / sizeof(ulong); i++) { @@ -55,7 +55,7 @@ namespace Ryujinx.HLE.HOS.Services.Sdb.Pdm.QueryService MemoryHelper.FillWithZeros(context.Memory, outputPosition, (int)outputSize); // Return ResultCode.ServiceUnavailable if data is locked by another process. - var filteredApplicationPlayStatistics = applicationPlayStatistics.AsEnumerable(); + var filteredApplicationPlayStatistics = _applicationPlayStatistics.AsEnumerable(); if (queryCapability == PlayLogQueryCapability.None) { @@ -81,4 +81,4 @@ namespace Ryujinx.HLE.HOS.Services.Sdb.Pdm.QueryService return ResultCode.Success; } } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.HLE/HOS/Services/Sdb/Pdm/QueryService/Types/ApplicationPlayStatistics.cs b/src/Ryujinx.HLE/HOS/Services/Sdb/Pdm/QueryService/Types/ApplicationPlayStatistics.cs index c28d757e..b58fd219 100644 --- a/src/Ryujinx.HLE/HOS/Services/Sdb/Pdm/QueryService/Types/ApplicationPlayStatistics.cs +++ b/src/Ryujinx.HLE/HOS/Services/Sdb/Pdm/QueryService/Types/ApplicationPlayStatistics.cs @@ -6,7 +6,7 @@ namespace Ryujinx.HLE.HOS.Services.Sdb.Pdm.QueryService.Types struct ApplicationPlayStatistics { public ulong TitleId; - public long TotalPlayTime; // In nanoseconds. - public long TotalLaunchCount; + public long TotalPlayTime; // In nanoseconds. + public long TotalLaunchCount; } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.HLE/HOS/Services/Sdb/Pdm/QueryService/Types/PlayLogQueryCapability.cs b/src/Ryujinx.HLE/HOS/Services/Sdb/Pdm/QueryService/Types/PlayLogQueryCapability.cs index 9e4b85de..c1e77ed3 100644 --- a/src/Ryujinx.HLE/HOS/Services/Sdb/Pdm/QueryService/Types/PlayLogQueryCapability.cs +++ b/src/Ryujinx.HLE/HOS/Services/Sdb/Pdm/QueryService/Types/PlayLogQueryCapability.cs @@ -4,6 +4,6 @@ { None, WhiteList, - All + All, } -}
\ No newline at end of file +} |
