VERY experimental Nintendo Switch 2 emulator
C++
service: Add empty interface for pctl:a.
bunnei26495098a904
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txtindex 1e023303d3..21d75071d1 100644--- a/src/core/CMakeLists.txt+++ b/src/core/CMakeLists.txt@@ -56,6 +56,8 @@ set(SRCShle/service/gsp_gpu.cpphle/service/hid/hid.cpphle/service/lm/lm.cpp+ hle/service/pctl/pctl.cpp+ hle/service/pctl/pctl_a.cpphle/service/service.cpphle/service/sm/controller.cpphle/service/sm/sm.cpp@@ -150,6 +152,8 @@ set(HEADERShle/service/gsp_gpu.hhle/service/hid/hid.hhle/service/lm/lm.h+ hle/service/pctl/pctl.h+ hle/service/pctl/pctl_a.hhle/service/service.hhle/service/sm/controller.hhle/service/sm/sm.hdiff --git a/src/core/hle/service/pctl/pctl.cpp b/src/core/hle/service/pctl/pctl.cppnew file mode 100644index 0000000000..1b92f9f841--- /dev/null+++ b/src/core/hle/service/pctl/pctl.cpp@@ -0,0 +1,16 @@+// Copyright 2017 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#include "core/hle/service/pctl/pctl.h"+#include "core/hle/service/pctl/pctl_a.h"++namespace Service {+namespace PCTL {++void InstallInterfaces(SM::ServiceManager& service_manager) {+ std::make_shared<PCTL_A>()->InstallAsService(service_manager);+}++} // namespace PCTL+} // namespace Servicediff --git a/src/core/hle/service/pctl/pctl.h b/src/core/hle/service/pctl/pctl.hnew file mode 100644index 0000000000..132eb0cc14--- /dev/null+++ b/src/core/hle/service/pctl/pctl.h@@ -0,0 +1,16 @@+// Copyright 2017 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#pragma once++#include "core/hle/service/service.h"++namespace Service {+namespace PCTL {++/// Registers all PCTL services with the specified service manager.+void InstallInterfaces(SM::ServiceManager& service_manager);++} // namespace PCTL+} // namespace Servicediff --git a/src/core/hle/service/pctl/pctl_a.cpp b/src/core/hle/service/pctl/pctl_a.cppnew file mode 100644index 0000000000..97cd1d2ee2--- /dev/null+++ b/src/core/hle/service/pctl/pctl_a.cpp@@ -0,0 +1,30 @@+// Copyright 2017 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#include "common/logging/log.h"+#include "core/hle/ipc_helpers.h"+#include "core/hle/service/pctl/pctl_a.h"++namespace Service {+namespace PCTL {++void InstallInterfaces(SM::ServiceManager& service_manager) {+ std::make_shared<PCTL_A>()->InstallAsService(service_manager);+}++void PCTL_A::GetService(Kernel::HLERequestContext& ctx) {+ LOG_WARNING(Service, "(STUBBED) called");+ IPC::RequestBuilder rb{ctx, 1};+ rb.Push(RESULT_SUCCESS);+}++PCTL_A::PCTL_A() : ServiceFramework("pctl:a") {+ static const FunctionInfo functions[] = {+ {0, &PCTL_A::GetService, "GetService"},+ };+ RegisterHandlers(functions);+}++} // namespace PCTL+} // namespace Servicediff --git a/src/core/hle/service/pctl/pctl_a.h b/src/core/hle/service/pctl/pctl_a.hnew file mode 100644index 0000000000..b61622cecd--- /dev/null+++ b/src/core/hle/service/pctl/pctl_a.h@@ -0,0 +1,22 @@+// Copyright 2017 Citra Emulator Project+// Licensed under GPLv2 or any later version+// Refer to the license.txt file included.++#pragma once++#include "core/hle/service/service.h"++namespace Service {+namespace PCTL {++class PCTL_A final : public ServiceFramework<PCTL_A> {+public:+ PCTL_A();+ ~PCTL_A() = default;++private:+ void GetService(Kernel::HLERequestContext& ctx);+};++} // namespace PCTL+} // namespace Servicediff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cppindex 3394ea414d..0fba224e1e 100644--- a/src/core/hle/service/service.cpp+++ b/src/core/hle/service/service.cpp@@ -22,6 +22,7 @@#include "core/hle/service/gsp_gpu.h"#include "core/hle/service/hid/hid.h"#include "core/hle/service/lm/lm.h"+#include "core/hle/service/pctl/pctl.h"#include "core/hle/service/service.h"#include "core/hle/service/sm/controller.h"#include "core/hle/service/sm/sm.h"@@ -173,6 +174,7 @@ void Init() {AOC::InstallInterfaces(*SM::g_service_manager);APM::InstallInterfaces(*SM::g_service_manager);LM::InstallInterfaces(*SM::g_service_manager);+ PCTL::InstallInterfaces(*SM::g_service_manager);HID::Init();