diff options
author | Liam <byteslice@airmail.cc> | 2024-02-22 03:57:18 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-02-22 04:26:32 +0100 |
commit | 352297d361e46eb19a84d174d54d82bc3d2adcef (patch) | |
tree | 5189f10e37f8d273258a39a7cccced1aee735cfd /src/core/hle/service/psc | |
parent | psc: move IPmControl, IPmModule, IPmService (diff) | |
download | yuzu-352297d361e46eb19a84d174d54d82bc3d2adcef.tar yuzu-352297d361e46eb19a84d174d54d82bc3d2adcef.tar.gz yuzu-352297d361e46eb19a84d174d54d82bc3d2adcef.tar.bz2 yuzu-352297d361e46eb19a84d174d54d82bc3d2adcef.tar.lz yuzu-352297d361e46eb19a84d174d54d82bc3d2adcef.tar.xz yuzu-352297d361e46eb19a84d174d54d82bc3d2adcef.tar.zst yuzu-352297d361e46eb19a84d174d54d82bc3d2adcef.zip |
Diffstat (limited to 'src/core/hle/service/psc')
-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 @@ // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#include "core/hle/service/ipc_helpers.h" +#include "core/hle/service/cmif_serialization.h" #include "core/hle/service/psc/pm_module.h" #include "core/hle/service/psc/pm_service.h" @@ -10,7 +10,7 @@ namespace Service::PSC { IPmService::IPmService(Core::System& system_) : ServiceFramework{system_, "psc:m"} { // clang-format off static const FunctionInfo functions[] = { - {0, &IPmService::GetPmModule, "GetPmModule"}, + {0, D<&IPmService::GetPmModule>, "GetPmModule"}, }; // clang-format on @@ -19,12 +19,10 @@ IPmService::IPmService(Core::System& system_) : ServiceFramework{system_, "psc:m IPmService::~IPmService() = default; -void IPmService::GetPmModule(HLERequestContext& ctx) { +Result IPmService::GetPmModule(Out<SharedPointer<IPmModule>> out_module) { LOG_DEBUG(Service_PSC, "called"); - - IPC::ResponseBuilder rb{ctx, 2, 0, 1}; - rb.Push(ResultSuccess); - rb.PushIpcInterface<IPmModule>(system); + *out_module = std::make_shared<IPmModule>(system); + R_SUCCEED(); } } // 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 @@ #pragma once +#include "core/hle/service/cmif_types.h" #include "core/hle/service/service.h" namespace Service::PSC { +class IPmModule; + class IPmService final : public ServiceFramework<IPmService> { public: explicit IPmService(Core::System& system_); ~IPmService() override; private: - void GetPmModule(HLERequestContext& ctx); + Result GetPmModule(Out<SharedPointer<IPmModule>> out_module); }; } // namespace Service::PSC |