aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/service/bpc/bpc.cpp
diff options
context:
space:
mode:
authorlizzie <lizzie@eden-emu.dev>2026-08-18 18:11:33 +0200
committercrueter <crueter@eden-emu.dev>2026-08-18 18:11:33 +0200
commita41a98028a541e8e44d6220d0b58e45017e25c85 (patch)
treea7b42d3220c89a1b555ea24dd2c2684ae083014a /src/core/hle/service/bpc/bpc.cpp
parent265c27f3911e427719231a324b30daaba6f10f9f (diff)
[hle/service] stub missing homebrew services, fix NPad/caps crashes (#4264)
Signed-off-by: lizzie <lizzie@eden-emu.dev> - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- this PR adds various missing services (acc:e, acc:e:u1) to expand homebrew compatibility notably this also fixes NPad related crashes due to nullref Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4264 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Diffstat (limited to 'src/core/hle/service/bpc/bpc.cpp')
-rw-r--r--src/core/hle/service/bpc/bpc.cpp50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/core/hle/service/bpc/bpc.cpp b/src/core/hle/service/bpc/bpc.cpp
index 91b15e256c..6fd7001821 100644
--- a/src/core/hle/service/bpc/bpc.cpp
+++ b/src/core/hle/service/bpc/bpc.cpp
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -54,11 +57,58 @@ public:
}
};
+class BPC_C final : public ServiceFramework<BPC_C> {
+public:
+ explicit BPC_C(Core::System& system_) : ServiceFramework{system_, "bpc:c"} {
+ // clang-format off
+ static const FunctionInfo functions[] = {
+ {0, nullptr, "ShutdownSystem"},
+ {1, nullptr, "RebootSystem"},
+ {2, nullptr, "GetWakeupReason"},
+ {3, nullptr, "GetShutdownReason"},
+ {4, nullptr, "GetAcOk"},
+ {5, nullptr, "GetPowerEvent"},
+ };
+ // clang-format on
+ RegisterHandlers(functions);
+ }
+};
+
+class BPC_B final : public ServiceFramework<BPC_B> {
+public:
+ explicit BPC_B(Core::System& system_) : ServiceFramework{system_, "bpc:b"} {
+ // clang-format off
+ static const FunctionInfo functions[] = {
+ {0, nullptr, "GetSleepButtonState"},
+ {1, nullptr, "GetPowerButtonEvent"},
+ };
+ // clang-format on
+ RegisterHandlers(functions);
+ }
+};
+
+class BPC_W final : public ServiceFramework<BPC_W> {
+public:
+ explicit BPC_W(Core::System& system_) : ServiceFramework{system_, "bpc:w"} {
+ // clang-format off
+ static const FunctionInfo functions[] = {
+ {0, nullptr, "CreateWakeupTimer"},
+ {1, nullptr, "CancelWakeupTimer"},
+ {2, nullptr, "EnableWakeupTimerOnDevice"},
+ };
+ // clang-format on
+ RegisterHandlers(functions);
+ }
+};
+
void LoopProcess(Core::System& system) {
auto server_manager = std::make_unique<ServerManager>(system);
server_manager->RegisterNamedService("bpc", std::make_shared<BPC>(system));
server_manager->RegisterNamedService("bpc:r", std::make_shared<BPC_R>(system));
+ server_manager->RegisterNamedService("bpc:c", std::make_shared<BPC_C>(system));
+ server_manager->RegisterNamedService("bpc:b", std::make_shared<BPC_B>(system));
+ server_manager->RegisterNamedService("bpc:w", std::make_shared<BPC_W>(system));
ServerManager::RunServer(std::move(server_manager));
}