Use correct TimeZoneService interface for both StaticService implementations

This commit is contained in:
Thog 2019-09-30 01:07:22 +02:00
commit 0fa8f92cde
No known key found for this signature in database
GPG key ID: 0CD291558FAFDBC6
3 changed files with 7 additions and 5 deletions

View file

@ -2,6 +2,7 @@
using Ryujinx.HLE.HOS.Services.Pcv.Bpc; using Ryujinx.HLE.HOS.Services.Pcv.Bpc;
using Ryujinx.HLE.HOS.Services.Settings; using Ryujinx.HLE.HOS.Services.Settings;
using Ryujinx.HLE.HOS.Services.Time.Clock; using Ryujinx.HLE.HOS.Services.Time.Clock;
using Ryujinx.HLE.HOS.Services.Time.StaticService;
namespace Ryujinx.HLE.HOS.Services.Time namespace Ryujinx.HLE.HOS.Services.Time
{ {
@ -44,8 +45,9 @@ namespace Ryujinx.HLE.HOS.Services.Time
// GetTimeZoneService() -> object<nn::timesrv::detail::service::ITimeZoneService> // GetTimeZoneService() -> object<nn::timesrv::detail::service::ITimeZoneService>
public ResultCode GetTimeZoneService(ServiceCtx context) public ResultCode GetTimeZoneService(ServiceCtx context)
{ {
// TODO: ITimeZoneService is wrapped, apply 9.0.0 ITimeZoneService separation. MakeObject(context, new ITimeZoneServiceForGlue(TimeManager.Instance.TimeZone, (_permissions & TimePermissions.TimeZoneWritableMask) != 0));
return _inner.GetTimeZoneService(context);
return ResultCode.Success;
} }
[Command(4)] [Command(4)]

View file

@ -60,7 +60,7 @@ namespace Ryujinx.HLE.HOS.Services.Time
// GetTimeZoneService() -> object<nn::timesrv::detail::service::ITimeZoneService> // GetTimeZoneService() -> object<nn::timesrv::detail::service::ITimeZoneService>
public ResultCode GetTimeZoneService(ServiceCtx context) 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; return ResultCode.Success;
} }

View file

@ -7,13 +7,13 @@ using System.Text;
namespace Ryujinx.HLE.HOS.Services.Time.StaticService namespace Ryujinx.HLE.HOS.Services.Time.StaticService
{ {
class ITimeZoneService : IpcService class ITimeZoneServiceForGlue : IpcService
{ {
private TimeZoneContentManager _timeZoneContentManager; private TimeZoneContentManager _timeZoneContentManager;
private ITimeZoneServiceForPsc _inner; private ITimeZoneServiceForPsc _inner;
private bool _writePermission; private bool _writePermission;
public ITimeZoneService(TimeZoneContentManager timeZoneContentManager, bool writePermission) public ITimeZoneServiceForGlue(TimeZoneContentManager timeZoneContentManager, bool writePermission)
{ {
_timeZoneContentManager = timeZoneContentManager; _timeZoneContentManager = timeZoneContentManager;
_writePermission = writePermission; _writePermission = writePermission;