summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/time
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-11-26 21:19:08 +0100
committerLioncash <mathew1800@gmail.com>2020-11-27 02:03:11 +0100
commit1a954b2a596fdfd4fc4b5feb9b43c8147de4cc7f (patch)
tree3593cd42e0ba676c3919561983f7e9766fcb641c /src/core/hle/service/time
parentMerge pull request #4975 from comex/invalid-syncpoint-id (diff)
downloadyuzu-1a954b2a596fdfd4fc4b5feb9b43c8147de4cc7f.tar
yuzu-1a954b2a596fdfd4fc4b5feb9b43c8147de4cc7f.tar.gz
yuzu-1a954b2a596fdfd4fc4b5feb9b43c8147de4cc7f.tar.bz2
yuzu-1a954b2a596fdfd4fc4b5feb9b43c8147de4cc7f.tar.lz
yuzu-1a954b2a596fdfd4fc4b5feb9b43c8147de4cc7f.tar.xz
yuzu-1a954b2a596fdfd4fc4b5feb9b43c8147de4cc7f.tar.zst
yuzu-1a954b2a596fdfd4fc4b5feb9b43c8147de4cc7f.zip
Diffstat (limited to 'src/core/hle/service/time')
-rw-r--r--src/core/hle/service/time/interface.cpp2
-rw-r--r--src/core/hle/service/time/time.cpp18
-rw-r--r--src/core/hle/service/time/time.h4
-rw-r--r--src/core/hle/service/time/time_zone_service.cpp5
-rw-r--r--src/core/hle/service/time/time_zone_service.h7
5 files changed, 21 insertions, 15 deletions
diff --git a/src/core/hle/service/time/interface.cpp b/src/core/hle/service/time/interface.cpp
index ba8fd6152..a01d9e0ff 100644
--- a/src/core/hle/service/time/interface.cpp
+++ b/src/core/hle/service/time/interface.cpp
@@ -7,7 +7,7 @@
namespace Service::Time {
Time::Time(std::shared_ptr<Module> module, Core::System& system, const char* name)
- : Module::Interface(std::move(module), system, name) {
+ : Interface(std::move(module), system, name) {
// clang-format off
static const FunctionInfo functions[] = {
{0, &Time::GetStandardUserSystemClock, "GetStandardUserSystemClock"},
diff --git a/src/core/hle/service/time/time.cpp b/src/core/hle/service/time/time.cpp
index 7d0474e0b..7b7ac282d 100644
--- a/src/core/hle/service/time/time.cpp
+++ b/src/core/hle/service/time/time.cpp
@@ -21,8 +21,8 @@ namespace Service::Time {
class ISystemClock final : public ServiceFramework<ISystemClock> {
public:
- explicit ISystemClock(Clock::SystemClockCore& clock_core, Core::System& system)
- : ServiceFramework("ISystemClock"), clock_core{clock_core}, system{system} {
+ explicit ISystemClock(Clock::SystemClockCore& clock_core_, Core::System& system_)
+ : ServiceFramework{system_, "ISystemClock"}, clock_core{clock_core_} {
// clang-format off
static const FunctionInfo functions[] = {
{0, &ISystemClock::GetCurrentTime, "GetCurrentTime"},
@@ -82,13 +82,12 @@ private:
}
Clock::SystemClockCore& clock_core;
- Core::System& system;
};
class ISteadyClock final : public ServiceFramework<ISteadyClock> {
public:
- explicit ISteadyClock(Clock::SteadyClockCore& clock_core, Core::System& system)
- : ServiceFramework("ISteadyClock"), clock_core{clock_core}, system{system} {
+ explicit ISteadyClock(Clock::SteadyClockCore& clock_core_, Core::System& system_)
+ : ServiceFramework{system_, "ISteadyClock"}, clock_core{clock_core_} {
static const FunctionInfo functions[] = {
{0, &ISteadyClock::GetCurrentTimePoint, "GetCurrentTimePoint"},
{2, nullptr, "GetTestOffset"},
@@ -119,7 +118,6 @@ private:
}
Clock::SteadyClockCore& clock_core;
- Core::System& system;
};
ResultCode Module::Interface::GetClockSnapshotFromSystemClockContextInternal(
@@ -206,7 +204,8 @@ void Module::Interface::GetTimeZoneService(Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service_Time, "called");
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
rb.Push(RESULT_SUCCESS);
- rb.PushIpcInterface<ITimeZoneService>(system.GetTimeManager().GetTimeZoneContentManager());
+ rb.PushIpcInterface<ITimeZoneService>(system,
+ system.GetTimeManager().GetTimeZoneContentManager());
}
void Module::Interface::GetStandardLocalSystemClock(Kernel::HLERequestContext& ctx) {
@@ -375,8 +374,9 @@ void Module::Interface::GetSharedMemoryNativeHandle(Kernel::HLERequestContext& c
rb.PushCopyObjects(SharedFrom(&system.Kernel().GetTimeSharedMem()));
}
-Module::Interface::Interface(std::shared_ptr<Module> module, Core::System& system, const char* name)
- : ServiceFramework(name), module{std::move(module)}, system{system} {}
+Module::Interface::Interface(std::shared_ptr<Module> module_, Core::System& system_,
+ const char* name)
+ : ServiceFramework{system_, name}, module{std::move(module_)} {}
Module::Interface::~Interface() = default;
diff --git a/src/core/hle/service/time/time.h b/src/core/hle/service/time/time.h
index 49f4aac0a..975a8ae5b 100644
--- a/src/core/hle/service/time/time.h
+++ b/src/core/hle/service/time/time.h
@@ -20,7 +20,8 @@ public:
class Interface : public ServiceFramework<Interface> {
public:
- explicit Interface(std::shared_ptr<Module> module, Core::System& system, const char* name);
+ explicit Interface(std::shared_ptr<Module> module_, Core::System& system_,
+ const char* name);
~Interface() override;
void GetStandardUserSystemClock(Kernel::HLERequestContext& ctx);
@@ -44,7 +45,6 @@ public:
protected:
std::shared_ptr<Module> module;
- Core::System& system;
};
};
diff --git a/src/core/hle/service/time/time_zone_service.cpp b/src/core/hle/service/time/time_zone_service.cpp
index ff3a10b3e..25cecbc83 100644
--- a/src/core/hle/service/time/time_zone_service.cpp
+++ b/src/core/hle/service/time/time_zone_service.cpp
@@ -10,8 +10,9 @@
namespace Service::Time {
-ITimeZoneService ::ITimeZoneService(TimeZone::TimeZoneContentManager& time_zone_content_manager)
- : ServiceFramework("ITimeZoneService"), time_zone_content_manager{time_zone_content_manager} {
+ITimeZoneService ::ITimeZoneService(Core::System& system_,
+ TimeZone::TimeZoneContentManager& time_zone_manager_)
+ : ServiceFramework{system_, "ITimeZoneService"}, time_zone_content_manager{time_zone_manager_} {
static const FunctionInfo functions[] = {
{0, &ITimeZoneService::GetDeviceLocationName, "GetDeviceLocationName"},
{1, nullptr, "SetDeviceLocationName"},
diff --git a/src/core/hle/service/time/time_zone_service.h b/src/core/hle/service/time/time_zone_service.h
index cb495748b..2c9b97603 100644
--- a/src/core/hle/service/time/time_zone_service.h
+++ b/src/core/hle/service/time/time_zone_service.h
@@ -6,6 +6,10 @@
#include "core/hle/service/service.h"
+namespace Core {
+class System;
+}
+
namespace Service::Time {
namespace TimeZone {
@@ -14,7 +18,8 @@ class TimeZoneContentManager;
class ITimeZoneService final : public ServiceFramework<ITimeZoneService> {
public:
- explicit ITimeZoneService(TimeZone::TimeZoneContentManager& time_zone_manager);
+ explicit ITimeZoneService(Core::System& system_,
+ TimeZone::TimeZoneContentManager& time_zone_manager_);
private:
void GetDeviceLocationName(Kernel::HLERequestContext& ctx);