diff options
Diffstat (limited to 'src/core/hle/service')
-rw-r--r-- | src/core/hle/service/audio/audout_u.cpp | 1 | ||||
-rw-r--r-- | src/core/hle/service/audio/audren_u.cpp | 1 | ||||
-rw-r--r-- | src/core/hle/service/hid/hid.cpp | 1 | ||||
-rw-r--r-- | src/core/hle/service/nvflinger/nvflinger.cpp | 1 | ||||
-rw-r--r-- | src/core/hle/service/set/set_sys.cpp | 19 | ||||
-rw-r--r-- | src/core/hle/service/set/set_sys.h | 11 | ||||
-rw-r--r-- | src/core/hle/service/time/interface.cpp (renamed from src/core/hle/service/time/time_s.cpp) | 15 | ||||
-rw-r--r-- | src/core/hle/service/time/interface.h (renamed from src/core/hle/service/time/time_s.h) | 4 | ||||
-rw-r--r-- | src/core/hle/service/time/time.cpp | 9 | ||||
-rw-r--r-- | src/core/hle/service/time/time_u.cpp | 31 | ||||
-rw-r--r-- | src/core/hle/service/time/time_u.h | 16 |
11 files changed, 44 insertions, 65 deletions
diff --git a/src/core/hle/service/audio/audout_u.cpp b/src/core/hle/service/audio/audout_u.cpp index 154bc12da..1dcd84d98 100644 --- a/src/core/hle/service/audio/audout_u.cpp +++ b/src/core/hle/service/audio/audout_u.cpp @@ -6,6 +6,7 @@ #include <vector> #include "common/logging/log.h" #include "core/core_timing.h" +#include "core/core_timing_util.h" #include "core/hle/ipc_helpers.h" #include "core/hle/kernel/event.h" #include "core/hle/kernel/hle_ipc.h" diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cpp index e623f4f8e..6aed9e2fa 100644 --- a/src/core/hle/service/audio/audren_u.cpp +++ b/src/core/hle/service/audio/audren_u.cpp @@ -7,6 +7,7 @@ #include "common/alignment.h" #include "common/logging/log.h" #include "core/core_timing.h" +#include "core/core_timing_util.h" #include "core/hle/ipc_helpers.h" #include "core/hle/kernel/event.h" #include "core/hle/kernel/hle_ipc.h" diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 475a0a5cf..9a02ba686 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp @@ -5,6 +5,7 @@ #include <atomic> #include "common/logging/log.h" #include "core/core_timing.h" +#include "core/core_timing_util.h" #include "core/frontend/emu_window.h" #include "core/frontend/input.h" #include "core/hle/ipc_helpers.h" diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp index 1fca1743d..5344441e1 100644 --- a/src/core/hle/service/nvflinger/nvflinger.cpp +++ b/src/core/hle/service/nvflinger/nvflinger.cpp @@ -9,6 +9,7 @@ #include "common/scope_exit.h" #include "core/core.h" #include "core/core_timing.h" +#include "core/core_timing_util.h" #include "core/hle/service/nvdrv/devices/nvdisp_disp0.h" #include "core/hle/service/nvdrv/nvdrv.h" #include "core/hle/service/nvflinger/buffer_queue.h" diff --git a/src/core/hle/service/set/set_sys.cpp b/src/core/hle/service/set/set_sys.cpp index fa85277fe..41efca31c 100644 --- a/src/core/hle/service/set/set_sys.cpp +++ b/src/core/hle/service/set/set_sys.cpp @@ -10,13 +10,22 @@ namespace Service::Set { void SET_SYS::GetColorSetId(Kernel::HLERequestContext& ctx) { - IPC::ResponseBuilder rb{ctx, 3}; rb.Push(RESULT_SUCCESS); - rb.Push<u32>(0); + rb.PushEnum(color_set); - LOG_WARNING(Service_SET, "(STUBBED) called"); + LOG_DEBUG(Service_SET, "called"); +} + +void SET_SYS::SetColorSetId(Kernel::HLERequestContext& ctx) { + IPC::RequestParser rp{ctx}; + color_set = rp.PopEnum<ColorSet>(); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(RESULT_SUCCESS); + + LOG_DEBUG(Service_SET, "called"); } SET_SYS::SET_SYS() : ServiceFramework("set:sys") { @@ -44,7 +53,7 @@ SET_SYS::SET_SYS() : ServiceFramework("set:sys") { {21, nullptr, "GetEulaVersions"}, {22, nullptr, "SetEulaVersions"}, {23, &SET_SYS::GetColorSetId, "GetColorSetId"}, - {24, nullptr, "SetColorSetId"}, + {24, &SET_SYS::SetColorSetId, "SetColorSetId"}, {25, nullptr, "GetConsoleInformationUploadFlag"}, {26, nullptr, "SetConsoleInformationUploadFlag"}, {27, nullptr, "GetAutomaticApplicationDownloadFlag"}, @@ -172,4 +181,6 @@ SET_SYS::SET_SYS() : ServiceFramework("set:sys") { RegisterHandlers(functions); } +SET_SYS::~SET_SYS() = default; + } // namespace Service::Set diff --git a/src/core/hle/service/set/set_sys.h b/src/core/hle/service/set/set_sys.h index b77a97cde..f602f3c77 100644 --- a/src/core/hle/service/set/set_sys.h +++ b/src/core/hle/service/set/set_sys.h @@ -11,10 +11,19 @@ namespace Service::Set { class SET_SYS final : public ServiceFramework<SET_SYS> { public: explicit SET_SYS(); - ~SET_SYS() = default; + ~SET_SYS() override; private: + /// Indicates the current theme set by the system settings + enum class ColorSet : u32 { + BasicWhite = 0, + BasicBlack = 1, + }; + void GetColorSetId(Kernel::HLERequestContext& ctx); + void SetColorSetId(Kernel::HLERequestContext& ctx); + + ColorSet color_set = ColorSet::BasicWhite; }; } // namespace Service::Set diff --git a/src/core/hle/service/time/time_s.cpp b/src/core/hle/service/time/interface.cpp index 0b599ea00..048d5b077 100644 --- a/src/core/hle/service/time/time_s.cpp +++ b/src/core/hle/service/time/interface.cpp @@ -2,17 +2,18 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -#include "core/hle/service/time/time_s.h" +#include "core/hle/service/time/interface.h" namespace Service::Time { -TIME_S::TIME_S(std::shared_ptr<Module> time) : Module::Interface(std::move(time), "time:s") { +Time::Time(std::shared_ptr<Module> time, const char* name) + : Module::Interface(std::move(time), name) { static const FunctionInfo functions[] = { - {0, &TIME_S::GetStandardUserSystemClock, "GetStandardUserSystemClock"}, - {1, &TIME_S::GetStandardNetworkSystemClock, "GetStandardNetworkSystemClock"}, - {2, &TIME_S::GetStandardSteadyClock, "GetStandardSteadyClock"}, - {3, &TIME_S::GetTimeZoneService, "GetTimeZoneService"}, - {4, &TIME_S::GetStandardLocalSystemClock, "GetStandardLocalSystemClock"}, + {0, &Time::GetStandardUserSystemClock, "GetStandardUserSystemClock"}, + {1, &Time::GetStandardNetworkSystemClock, "GetStandardNetworkSystemClock"}, + {2, &Time::GetStandardSteadyClock, "GetStandardSteadyClock"}, + {3, &Time::GetTimeZoneService, "GetTimeZoneService"}, + {4, &Time::GetStandardLocalSystemClock, "GetStandardLocalSystemClock"}, {5, nullptr, "GetEphemeralNetworkSystemClock"}, {50, nullptr, "SetStandardSteadyClockInternalOffset"}, {100, nullptr, "IsStandardUserSystemClockAutomaticCorrectionEnabled"}, diff --git a/src/core/hle/service/time/time_s.h b/src/core/hle/service/time/interface.h index 4a2daa513..183a53db1 100644 --- a/src/core/hle/service/time/time_s.h +++ b/src/core/hle/service/time/interface.h @@ -8,9 +8,9 @@ namespace Service::Time { -class TIME_S final : public Module::Interface { +class Time final : public Module::Interface { public: - explicit TIME_S(std::shared_ptr<Module> time); + explicit Time(std::shared_ptr<Module> time, const char* name); }; } // namespace Service::Time diff --git a/src/core/hle/service/time/time.cpp b/src/core/hle/service/time/time.cpp index 507ae95f4..37b58bb77 100644 --- a/src/core/hle/service/time/time.cpp +++ b/src/core/hle/service/time/time.cpp @@ -6,12 +6,12 @@ #include <ctime> #include "common/logging/log.h" #include "core/core_timing.h" +#include "core/core_timing_util.h" #include "core/hle/ipc_helpers.h" #include "core/hle/kernel/client_port.h" #include "core/hle/kernel/client_session.h" +#include "core/hle/service/time/interface.h" #include "core/hle/service/time/time.h" -#include "core/hle/service/time/time_s.h" -#include "core/hle/service/time/time_u.h" namespace Service::Time { @@ -212,8 +212,9 @@ Module::Interface::Interface(std::shared_ptr<Module> time, const char* name) void InstallInterfaces(SM::ServiceManager& service_manager) { auto time = std::make_shared<Module>(); - std::make_shared<TIME_S>(time)->InstallAsService(service_manager); - std::make_shared<TIME_U>(time)->InstallAsService(service_manager); + std::make_shared<Time>(time, "time:a")->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 diff --git a/src/core/hle/service/time/time_u.cpp b/src/core/hle/service/time/time_u.cpp deleted file mode 100644 index 1ed42c419..000000000 --- a/src/core/hle/service/time/time_u.cpp +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2018 yuzu emulator team -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. - -#include "core/hle/service/time/time_u.h" - -namespace Service::Time { - -TIME_U::TIME_U(std::shared_ptr<Module> time) : Module::Interface(std::move(time), "time:u") { - static const FunctionInfo functions[] = { - {0, &TIME_U::GetStandardUserSystemClock, "GetStandardUserSystemClock"}, - {1, &TIME_U::GetStandardNetworkSystemClock, "GetStandardNetworkSystemClock"}, - {2, &TIME_U::GetStandardSteadyClock, "GetStandardSteadyClock"}, - {3, &TIME_U::GetTimeZoneService, "GetTimeZoneService"}, - {4, &TIME_U::GetStandardLocalSystemClock, "GetStandardLocalSystemClock"}, - {5, nullptr, "GetEphemeralNetworkSystemClock"}, - {50, nullptr, "SetStandardSteadyClockInternalOffset"}, - {100, nullptr, "IsStandardUserSystemClockAutomaticCorrectionEnabled"}, - {101, nullptr, "SetStandardUserSystemClockAutomaticCorrectionEnabled"}, - {102, nullptr, "GetStandardUserSystemClockInitialYear"}, - {200, nullptr, "IsStandardNetworkSystemClockAccuracySufficient"}, - {300, nullptr, "CalculateMonotonicSystemClockBaseTimePoint"}, - {400, nullptr, "GetClockSnapshot"}, - {401, nullptr, "GetClockSnapshotFromSystemClockContext"}, - {500, nullptr, "CalculateStandardUserSystemClockDifferenceByUser"}, - {501, nullptr, "CalculateSpanBetween"}, - }; - RegisterHandlers(functions); -} - -} // namespace Service::Time diff --git a/src/core/hle/service/time/time_u.h b/src/core/hle/service/time/time_u.h deleted file mode 100644 index 3724bcdc7..000000000 --- a/src/core/hle/service/time/time_u.h +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2018 yuzu emulator team -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. - -#pragma once - -#include "core/hle/service/time/time.h" - -namespace Service::Time { - -class TIME_U final : public Module::Interface { -public: - explicit TIME_U(std::shared_ptr<Module> time); -}; - -} // namespace Service::Time |