aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/OsHle/Services/Time/IStaticService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.HLE/OsHle/Services/Time/IStaticService.cs')
-rw-r--r--Ryujinx.HLE/OsHle/Services/Time/IStaticService.cs60
1 files changed, 60 insertions, 0 deletions
diff --git a/Ryujinx.HLE/OsHle/Services/Time/IStaticService.cs b/Ryujinx.HLE/OsHle/Services/Time/IStaticService.cs
new file mode 100644
index 00000000..1f012144
--- /dev/null
+++ b/Ryujinx.HLE/OsHle/Services/Time/IStaticService.cs
@@ -0,0 +1,60 @@
+using Ryujinx.HLE.OsHle.Ipc;
+using System.Collections.Generic;
+
+namespace Ryujinx.HLE.OsHle.Services.Time
+{
+ class IStaticService : IpcService
+ {
+ private Dictionary<int, ServiceProcessRequest> m_Commands;
+
+ public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
+
+ public IStaticService()
+ {
+ m_Commands = new Dictionary<int, ServiceProcessRequest>()
+ {
+ { 0, GetStandardUserSystemClock },
+ { 1, GetStandardNetworkSystemClock },
+ { 2, GetStandardSteadyClock },
+ { 3, GetTimeZoneService },
+ { 4, GetStandardLocalSystemClock }
+ };
+ }
+
+ public long GetStandardUserSystemClock(ServiceCtx Context)
+ {
+ MakeObject(Context, new ISystemClock(SystemClockType.User));
+
+ return 0;
+ }
+
+ public long GetStandardNetworkSystemClock(ServiceCtx Context)
+ {
+ MakeObject(Context, new ISystemClock(SystemClockType.Network));
+
+ return 0;
+ }
+
+ public long GetStandardSteadyClock(ServiceCtx Context)
+ {
+ MakeObject(Context, new ISteadyClock());
+
+ return 0;
+ }
+
+ public long GetTimeZoneService(ServiceCtx Context)
+ {
+ MakeObject(Context, new ITimeZoneService());
+
+ return 0;
+ }
+
+ public long GetStandardLocalSystemClock(ServiceCtx Context)
+ {
+ MakeObject(Context, new ISystemClock(SystemClockType.Local));
+
+ return 0;
+ }
+
+ }
+} \ No newline at end of file