yuzu-emu
/
yuzu
Archived
1
0
Fork 0

time: Add the time:a service

Given we already have time:s and time:u, we should also have time:a
This commit is contained in:
Lioncash 2018-07-24 02:47:41 -04:00
parent a61124a9e7
commit 3c1cb3b11e
3 changed files with 11 additions and 10 deletions

View File

@ -6,14 +6,14 @@
namespace Service::Time { namespace Service::Time {
TIME::TIME(std::shared_ptr<Module> time, const char* name) Time::Time(std::shared_ptr<Module> time, const char* name)
: Module::Interface(std::move(time), name) { : Module::Interface(std::move(time), name) {
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, &TIME::GetStandardUserSystemClock, "GetStandardUserSystemClock"}, {0, &Time::GetStandardUserSystemClock, "GetStandardUserSystemClock"},
{1, &TIME::GetStandardNetworkSystemClock, "GetStandardNetworkSystemClock"}, {1, &Time::GetStandardNetworkSystemClock, "GetStandardNetworkSystemClock"},
{2, &TIME::GetStandardSteadyClock, "GetStandardSteadyClock"}, {2, &Time::GetStandardSteadyClock, "GetStandardSteadyClock"},
{3, &TIME::GetTimeZoneService, "GetTimeZoneService"}, {3, &Time::GetTimeZoneService, "GetTimeZoneService"},
{4, &TIME::GetStandardLocalSystemClock, "GetStandardLocalSystemClock"}, {4, &Time::GetStandardLocalSystemClock, "GetStandardLocalSystemClock"},
{5, nullptr, "GetEphemeralNetworkSystemClock"}, {5, nullptr, "GetEphemeralNetworkSystemClock"},
{50, nullptr, "SetStandardSteadyClockInternalOffset"}, {50, nullptr, "SetStandardSteadyClockInternalOffset"},
{100, nullptr, "IsStandardUserSystemClockAutomaticCorrectionEnabled"}, {100, nullptr, "IsStandardUserSystemClockAutomaticCorrectionEnabled"},

View File

@ -8,9 +8,9 @@
namespace Service::Time { namespace Service::Time {
class TIME final : public Module::Interface { class Time final : public Module::Interface {
public: public:
explicit TIME(std::shared_ptr<Module> time, const char* name); explicit Time(std::shared_ptr<Module> time, const char* name);
}; };
} // namespace Service::Time } // namespace Service::Time

View File

@ -211,8 +211,9 @@ Module::Interface::Interface(std::shared_ptr<Module> time, const char* name)
void InstallInterfaces(SM::ServiceManager& service_manager) { void InstallInterfaces(SM::ServiceManager& service_manager) {
auto time = std::make_shared<Module>(); auto time = std::make_shared<Module>();
std::make_shared<TIME>(time, "time:s")->InstallAsService(service_manager); std::make_shared<Time>(time, "time:a")->InstallAsService(service_manager);
std::make_shared<TIME>(time, "time:u")->InstallAsService(service_manager); std::make_shared<Time>(time, "time:s")->InstallAsService(service_manager);
std::make_shared<Time>(time, "time:u")->InstallAsService(service_manager);
} }
} // namespace Service::Time } // namespace Service::Time