diff options
| author | 2018-07-23 23:47:01 -0400 | |
|---|---|---|
| committer | 2018-07-24 00:48:16 -0400 | |
| commit | 63c605c04af6f236cf13daf71cd6107b122820b5 (patch) | |
| tree | 3db705795d13e3d87b635084547a3668ff425412 | |
| parent | ipc_helper: Add helper member function for popping enum values to RequestParser (diff) | |
| download | yuzu-63c605c04af6f236cf13daf71cd6107b122820b5.tar.gz yuzu-63c605c04af6f236cf13daf71cd6107b122820b5.tar.xz yuzu-63c605c04af6f236cf13daf71cd6107b122820b5.zip | |
set_sys: Implement SetColorSetId()
| -rw-r--r-- | src/core/hle/service/set/set_sys.cpp | 19 | ||||
| -rw-r--r-- | src/core/hle/service/set/set_sys.h | 11 |
2 files changed, 25 insertions, 5 deletions
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 @@ | |||
| 10 | namespace Service::Set { | 10 | namespace Service::Set { |
| 11 | 11 | ||
| 12 | void SET_SYS::GetColorSetId(Kernel::HLERequestContext& ctx) { | 12 | void SET_SYS::GetColorSetId(Kernel::HLERequestContext& ctx) { |
| 13 | |||
| 14 | IPC::ResponseBuilder rb{ctx, 3}; | 13 | IPC::ResponseBuilder rb{ctx, 3}; |
| 15 | 14 | ||
| 16 | rb.Push(RESULT_SUCCESS); | 15 | rb.Push(RESULT_SUCCESS); |
| 17 | rb.Push<u32>(0); | 16 | rb.PushEnum(color_set); |
| 18 | 17 | ||
| 19 | LOG_WARNING(Service_SET, "(STUBBED) called"); | 18 | LOG_DEBUG(Service_SET, "called"); |
| 19 | } | ||
| 20 | |||
| 21 | void SET_SYS::SetColorSetId(Kernel::HLERequestContext& ctx) { | ||
| 22 | IPC::RequestParser rp{ctx}; | ||
| 23 | color_set = rp.PopEnum<ColorSet>(); | ||
| 24 | |||
| 25 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 26 | rb.Push(RESULT_SUCCESS); | ||
| 27 | |||
| 28 | LOG_DEBUG(Service_SET, "called"); | ||
| 20 | } | 29 | } |
| 21 | 30 | ||
| 22 | SET_SYS::SET_SYS() : ServiceFramework("set:sys") { | 31 | SET_SYS::SET_SYS() : ServiceFramework("set:sys") { |
| @@ -44,7 +53,7 @@ SET_SYS::SET_SYS() : ServiceFramework("set:sys") { | |||
| 44 | {21, nullptr, "GetEulaVersions"}, | 53 | {21, nullptr, "GetEulaVersions"}, |
| 45 | {22, nullptr, "SetEulaVersions"}, | 54 | {22, nullptr, "SetEulaVersions"}, |
| 46 | {23, &SET_SYS::GetColorSetId, "GetColorSetId"}, | 55 | {23, &SET_SYS::GetColorSetId, "GetColorSetId"}, |
| 47 | {24, nullptr, "SetColorSetId"}, | 56 | {24, &SET_SYS::SetColorSetId, "SetColorSetId"}, |
| 48 | {25, nullptr, "GetConsoleInformationUploadFlag"}, | 57 | {25, nullptr, "GetConsoleInformationUploadFlag"}, |
| 49 | {26, nullptr, "SetConsoleInformationUploadFlag"}, | 58 | {26, nullptr, "SetConsoleInformationUploadFlag"}, |
| 50 | {27, nullptr, "GetAutomaticApplicationDownloadFlag"}, | 59 | {27, nullptr, "GetAutomaticApplicationDownloadFlag"}, |
| @@ -172,4 +181,6 @@ SET_SYS::SET_SYS() : ServiceFramework("set:sys") { | |||
| 172 | RegisterHandlers(functions); | 181 | RegisterHandlers(functions); |
| 173 | } | 182 | } |
| 174 | 183 | ||
| 184 | SET_SYS::~SET_SYS() = default; | ||
| 185 | |||
| 175 | } // namespace Service::Set | 186 | } // 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 { | |||
| 11 | class SET_SYS final : public ServiceFramework<SET_SYS> { | 11 | class SET_SYS final : public ServiceFramework<SET_SYS> { |
| 12 | public: | 12 | public: |
| 13 | explicit SET_SYS(); | 13 | explicit SET_SYS(); |
| 14 | ~SET_SYS() = default; | 14 | ~SET_SYS() override; |
| 15 | 15 | ||
| 16 | private: | 16 | private: |
| 17 | /// Indicates the current theme set by the system settings | ||
| 18 | enum class ColorSet : u32 { | ||
| 19 | BasicWhite = 0, | ||
| 20 | BasicBlack = 1, | ||
| 21 | }; | ||
| 22 | |||
| 17 | void GetColorSetId(Kernel::HLERequestContext& ctx); | 23 | void GetColorSetId(Kernel::HLERequestContext& ctx); |
| 24 | void SetColorSetId(Kernel::HLERequestContext& ctx); | ||
| 25 | |||
| 26 | ColorSet color_set = ColorSet::BasicWhite; | ||
| 18 | }; | 27 | }; |
| 19 | 28 | ||
| 20 | } // namespace Service::Set | 29 | } // namespace Service::Set |