summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core/CMakeLists.txt4
-rw-r--r--src/core/hle/service/pctl/pctl.cpp16
-rw-r--r--src/core/hle/service/pctl/pctl.h16
-rw-r--r--src/core/hle/service/pctl/pctl_a.cpp30
-rw-r--r--src/core/hle/service/pctl/pctl_a.h22
-rw-r--r--src/core/hle/service/service.cpp2
6 files changed, 90 insertions, 0 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 1e023303d..21d75071d 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -56,6 +56,8 @@ set(SRCS
hle/service/gsp_gpu.cpp
hle/service/hid/hid.cpp
hle/service/lm/lm.cpp
+ hle/service/pctl/pctl.cpp
+ hle/service/pctl/pctl_a.cpp
hle/service/service.cpp
hle/service/sm/controller.cpp
hle/service/sm/sm.cpp
@@ -150,6 +152,8 @@ set(HEADERS
hle/service/gsp_gpu.h
hle/service/hid/hid.h
hle/service/lm/lm.h
+ hle/service/pctl/pctl.h
+ hle/service/pctl/pctl_a.h
hle/service/service.h
hle/service/sm/controller.h
hle/service/sm/sm.h
diff --git a/src/core/hle/service/pctl/pctl.cpp b/src/core/hle/service/pctl/pctl.cpp
new file mode 100644
index 000000000..1b92f9f84
--- /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 Service
diff --git a/src/core/hle/service/pctl/pctl.h b/src/core/hle/service/pctl/pctl.h
new file mode 100644
index 000000000..132eb0cc1
--- /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 Service
diff --git a/src/core/hle/service/pctl/pctl_a.cpp b/src/core/hle/service/pctl/pctl_a.cpp
new file mode 100644
index 000000000..97cd1d2ee
--- /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 Service
diff --git a/src/core/hle/service/pctl/pctl_a.h b/src/core/hle/service/pctl/pctl_a.h
new file mode 100644
index 000000000..b61622cec
--- /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 Service
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp
index 3394ea414..0fba224e1 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();