From 0fa8f92cdefa48fd824e8343477ddd3d617a6e8e Mon Sep 17 00:00:00 2001 From: Thog Date: Mon, 30 Sep 2019 01:07:22 +0200 Subject: [PATCH] Use correct TimeZoneService interface for both StaticService implementations --- Ryujinx.HLE/HOS/Services/Time/IStaticServiceForGlue.cs | 6 ++++-- Ryujinx.HLE/HOS/Services/Time/IStaticServiceForPsc.cs | 2 +- .../{ITimeZoneService.cs => ITimeZoneServiceForGlue.cs} | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) rename Ryujinx.HLE/HOS/Services/Time/StaticService/{ITimeZoneService.cs => ITimeZoneServiceForGlue.cs} (97%) diff --git a/Ryujinx.HLE/HOS/Services/Time/IStaticServiceForGlue.cs b/Ryujinx.HLE/HOS/Services/Time/IStaticServiceForGlue.cs index c52cf43ef9..feb8bc56d5 100644 --- a/Ryujinx.HLE/HOS/Services/Time/IStaticServiceForGlue.cs +++ b/Ryujinx.HLE/HOS/Services/Time/IStaticServiceForGlue.cs @@ -2,6 +2,7 @@ using Ryujinx.HLE.HOS.Services.Pcv.Bpc; using Ryujinx.HLE.HOS.Services.Settings; using Ryujinx.HLE.HOS.Services.Time.Clock; +using Ryujinx.HLE.HOS.Services.Time.StaticService; namespace Ryujinx.HLE.HOS.Services.Time { @@ -44,8 +45,9 @@ namespace Ryujinx.HLE.HOS.Services.Time // GetTimeZoneService() -> object public ResultCode GetTimeZoneService(ServiceCtx context) { - // TODO: ITimeZoneService is wrapped, apply 9.0.0 ITimeZoneService separation. - return _inner.GetTimeZoneService(context); + MakeObject(context, new ITimeZoneServiceForGlue(TimeManager.Instance.TimeZone, (_permissions & TimePermissions.TimeZoneWritableMask) != 0)); + + return ResultCode.Success; } [Command(4)] diff --git a/Ryujinx.HLE/HOS/Services/Time/IStaticServiceForPsc.cs b/Ryujinx.HLE/HOS/Services/Time/IStaticServiceForPsc.cs index 28ac89c7da..5c97bb232c 100644 --- a/Ryujinx.HLE/HOS/Services/Time/IStaticServiceForPsc.cs +++ b/Ryujinx.HLE/HOS/Services/Time/IStaticServiceForPsc.cs @@ -60,7 +60,7 @@ namespace Ryujinx.HLE.HOS.Services.Time // GetTimeZoneService() -> object public ResultCode GetTimeZoneService(ServiceCtx context) { - MakeObject(context, new ITimeZoneService(_timeManager.TimeZone, (_permissions & TimePermissions.TimeZoneWritableMask) != 0)); + MakeObject(context, new ITimeZoneServiceForPsc(_timeManager.TimeZone.Manager, (_permissions & TimePermissions.TimeZoneWritableMask) != 0)); return ResultCode.Success; } diff --git a/Ryujinx.HLE/HOS/Services/Time/StaticService/ITimeZoneService.cs b/Ryujinx.HLE/HOS/Services/Time/StaticService/ITimeZoneServiceForGlue.cs similarity index 97% rename from Ryujinx.HLE/HOS/Services/Time/StaticService/ITimeZoneService.cs rename to Ryujinx.HLE/HOS/Services/Time/StaticService/ITimeZoneServiceForGlue.cs index 9a1e6cc0c7..f718c58dcd 100644 --- a/Ryujinx.HLE/HOS/Services/Time/StaticService/ITimeZoneService.cs +++ b/Ryujinx.HLE/HOS/Services/Time/StaticService/ITimeZoneServiceForGlue.cs @@ -7,13 +7,13 @@ using System.Text; namespace Ryujinx.HLE.HOS.Services.Time.StaticService { - class ITimeZoneService : IpcService + class ITimeZoneServiceForGlue : IpcService { private TimeZoneContentManager _timeZoneContentManager; private ITimeZoneServiceForPsc _inner; private bool _writePermission; - public ITimeZoneService(TimeZoneContentManager timeZoneContentManager, bool writePermission) + public ITimeZoneServiceForGlue(TimeZoneContentManager timeZoneContentManager, bool writePermission) { _timeZoneContentManager = timeZoneContentManager; _writePermission = writePermission;