diff options
| -rw-r--r-- | src/core/hle/service/psc/pm_service.cpp | 12 | ||||
| -rw-r--r-- | src/core/hle/service/psc/pm_service.h | 5 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/core/hle/service/psc/pm_service.cpp b/src/core/hle/service/psc/pm_service.cpp index 99b16bbb0..c4e0ad228 100644 --- a/src/core/hle/service/psc/pm_service.cpp +++ b/src/core/hle/service/psc/pm_service.cpp | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project | 1 | // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project |
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | #include "core/hle/service/ipc_helpers.h" | 4 | #include "core/hle/service/cmif_serialization.h" |
| 5 | #include "core/hle/service/psc/pm_module.h" | 5 | #include "core/hle/service/psc/pm_module.h" |
| 6 | #include "core/hle/service/psc/pm_service.h" | 6 | #include "core/hle/service/psc/pm_service.h" |
| 7 | 7 | ||
| @@ -10,7 +10,7 @@ namespace Service::PSC { | |||
| 10 | IPmService::IPmService(Core::System& system_) : ServiceFramework{system_, "psc:m"} { | 10 | IPmService::IPmService(Core::System& system_) : ServiceFramework{system_, "psc:m"} { |
| 11 | // clang-format off | 11 | // clang-format off |
| 12 | static const FunctionInfo functions[] = { | 12 | static const FunctionInfo functions[] = { |
| 13 | {0, &IPmService::GetPmModule, "GetPmModule"}, | 13 | {0, D<&IPmService::GetPmModule>, "GetPmModule"}, |
| 14 | }; | 14 | }; |
| 15 | // clang-format on | 15 | // clang-format on |
| 16 | 16 | ||
| @@ -19,12 +19,10 @@ IPmService::IPmService(Core::System& system_) : ServiceFramework{system_, "psc:m | |||
| 19 | 19 | ||
| 20 | IPmService::~IPmService() = default; | 20 | IPmService::~IPmService() = default; |
| 21 | 21 | ||
| 22 | void IPmService::GetPmModule(HLERequestContext& ctx) { | 22 | Result IPmService::GetPmModule(Out<SharedPointer<IPmModule>> out_module) { |
| 23 | LOG_DEBUG(Service_PSC, "called"); | 23 | LOG_DEBUG(Service_PSC, "called"); |
| 24 | 24 | *out_module = std::make_shared<IPmModule>(system); | |
| 25 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 25 | R_SUCCEED(); |
| 26 | rb.Push(ResultSuccess); | ||
| 27 | rb.PushIpcInterface<IPmModule>(system); | ||
| 28 | } | 26 | } |
| 29 | 27 | ||
| 30 | } // namespace Service::PSC | 28 | } // namespace Service::PSC |
diff --git a/src/core/hle/service/psc/pm_service.h b/src/core/hle/service/psc/pm_service.h index e8bd1fa6b..08e14c6f8 100644 --- a/src/core/hle/service/psc/pm_service.h +++ b/src/core/hle/service/psc/pm_service.h | |||
| @@ -3,17 +3,20 @@ | |||
| 3 | 3 | ||
| 4 | #pragma once | 4 | #pragma once |
| 5 | 5 | ||
| 6 | #include "core/hle/service/cmif_types.h" | ||
| 6 | #include "core/hle/service/service.h" | 7 | #include "core/hle/service/service.h" |
| 7 | 8 | ||
| 8 | namespace Service::PSC { | 9 | namespace Service::PSC { |
| 9 | 10 | ||
| 11 | class IPmModule; | ||
| 12 | |||
| 10 | class IPmService final : public ServiceFramework<IPmService> { | 13 | class IPmService final : public ServiceFramework<IPmService> { |
| 11 | public: | 14 | public: |
| 12 | explicit IPmService(Core::System& system_); | 15 | explicit IPmService(Core::System& system_); |
| 13 | ~IPmService() override; | 16 | ~IPmService() override; |
| 14 | 17 | ||
| 15 | private: | 18 | private: |
| 16 | void GetPmModule(HLERequestContext& ctx); | 19 | Result GetPmModule(Out<SharedPointer<IPmModule>> out_module); |
| 17 | }; | 20 | }; |
| 18 | 21 | ||
| 19 | } // namespace Service::PSC | 22 | } // namespace Service::PSC |