diff options
Diffstat (limited to 'src/Ryujinx.HLE/HOS/Services/Sdb/Pdm')
6 files changed, 18 insertions, 18 deletions
diff --git a/src/Ryujinx.HLE/HOS/Services/Sdb/Pdm/INotifyService.cs b/src/Ryujinx.HLE/HOS/Services/Sdb/Pdm/INotifyService.cs index 5247a238..c2e04290 100644 --- a/src/Ryujinx.HLE/HOS/Services/Sdb/Pdm/INotifyService.cs +++ b/src/Ryujinx.HLE/HOS/Services/Sdb/Pdm/INotifyService.cs @@ -5,4 +5,4 @@ { public INotifyService(ServiceCtx context) { } } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.HLE/HOS/Services/Sdb/Pdm/IQueryService.cs b/src/Ryujinx.HLE/HOS/Services/Sdb/Pdm/IQueryService.cs index 1f66ff9d..c46050b8 100644 --- a/src/Ryujinx.HLE/HOS/Services/Sdb/Pdm/IQueryService.cs +++ b/src/Ryujinx.HLE/HOS/Services/Sdb/Pdm/IQueryService.cs @@ -21,4 +21,4 @@ namespace Ryujinx.HLE.HOS.Services.Sdb.Pdm return QueryPlayStatisticsManager.GetPlayStatistics(context, true); } } -}
\ No newline at end of file +} 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 +} diff --git a/src/Ryujinx.HLE/HOS/Services/Sdb/Pdm/ResultCode.cs b/src/Ryujinx.HLE/HOS/Services/Sdb/Pdm/ResultCode.cs index c337051b..dd20220f 100644 --- a/src/Ryujinx.HLE/HOS/Services/Sdb/Pdm/ResultCode.cs +++ b/src/Ryujinx.HLE/HOS/Services/Sdb/Pdm/ResultCode.cs @@ -2,14 +2,14 @@ { enum ResultCode { - ModuleId = 178, + ModuleId = 178, ErrorCodeShift = 9, Success = 0, - InvalidUserID = (100 << ErrorCodeShift) | ModuleId, - UserNotFound = (101 << ErrorCodeShift) | ModuleId, + InvalidUserID = (100 << ErrorCodeShift) | ModuleId, + UserNotFound = (101 << ErrorCodeShift) | ModuleId, ServiceUnavailable = (150 << ErrorCodeShift) | ModuleId, - FileStorageFailure = (200 << ErrorCodeShift) | ModuleId + FileStorageFailure = (200 << ErrorCodeShift) | ModuleId, } } |
