aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/service/mnpp/mnpp.cpp
diff options
context:
space:
mode:
authorPavelBARABANOV <pavelbarabanov94@gmail.com>2026-10-15 08:45:15 +0200
committercrueter <crueter@eden-emu.dev>2026-10-15 08:45:15 +0200
commite255c20db4111485d228c10478bda63aabcfdde5 (patch)
tree1f8c88981b60e9a4db4ed306742196b1c4b68116 /src/core/hle/service/mnpp/mnpp.cpp
parent14da4482a4668928bad43bb67ef12f96b9c9d972 (diff)
Revert "[hle] constexpr handler dispatch maps, introduce version gating (#4480)" (#4532)
This reverts commit 218c6705d950635bc18f8458d738a1996fb592b6. - [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. ------------------- Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4532 Reviewed-by: lizzie <lizzie@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: Maufeat <sahyno1996@gmail.com>
Diffstat (limited to 'src/core/hle/service/mnpp/mnpp.cpp')
-rw-r--r--src/core/hle/service/mnpp/mnpp.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/src/core/hle/service/mnpp/mnpp.cpp b/src/core/hle/service/mnpp/mnpp.cpp
index c5bc306302..11b6f3a386 100644
--- a/src/core/hle/service/mnpp/mnpp.cpp
+++ b/src/core/hle/service/mnpp/mnpp.cpp
@@ -14,10 +14,15 @@ namespace Service::MNPP {
class MNPP_APP final : public ServiceFramework<MNPP_APP> {
public:
- explicit MNPP_APP(Core::System& system_) : ServiceFramework{system_, "mnpp:app"} {}
-
- std::optional<FunctionInfoBase> FindRequest(u32 key) override {
- return HandlerTableGenerateWithFind(key, functions);
+ explicit MNPP_APP(Core::System& system_) : ServiceFramework{system_, "mnpp:app"} {
+ // clang-format off
+ static const FunctionInfo functions[] = {
+ {0, &MNPP_APP::Cmd0, "Cmd0"},
+ {1, &MNPP_APP::Cmd1, "Cmd1"},
+ };
+ // clang-format on
+
+ RegisterHandlers(functions);
}
private:
@@ -34,43 +39,38 @@ private:
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(ResultSuccess);
}
-
- static constexpr auto functions = CreateStaticMap(
- FunctionInfo{0, &MNPP_APP::Cmd0, "Cmd0"},
- FunctionInfo{1, &MNPP_APP::Cmd1, "Cmd1"}
- );
};
class MNPP_SYS final : public ServiceFramework<MNPP_SYS> {
public:
- explicit MNPP_SYS(Core::System& system_) : ServiceFramework{system_, "mnpp:sys"} {}
-
- static constexpr auto functions = CreateStaticMap(
- FunctionInfo{0, nullptr, "Cmd0"},
- FunctionInfo{10, nullptr, "Cmd10"},
- FunctionInfo{100, nullptr, "Cmd100"},
- FunctionInfo{200, nullptr, "Cmd200"},
- FunctionInfo{300, nullptr, "Cmd300"},
- FunctionInfo{400, nullptr, "Cmd400"}
- );
- std::optional<FunctionInfoBase> FindRequest(u32 key) override {
- return HandlerTableGenerateWithFind(key, functions);
+ explicit MNPP_SYS(Core::System& system_) : ServiceFramework{system_, "mnpp:sys"} {
+ // clang-format off
+ static const FunctionInfo functions[] = {
+ {0, nullptr, "Cmd0"},
+ {10, nullptr, "Cmd10"},
+ {100, nullptr, "Cmd100"},
+ {200, nullptr, "Cmd200"},
+ {300, nullptr, "Cmd300"},
+ {400, nullptr, "Cmd400"},
+ };
+ // clang-format on
+ RegisterHandlers(functions);
}
};
class MNPP_WEB final : public ServiceFramework<MNPP_WEB> {
public:
- explicit MNPP_WEB(Core::System& system_) : ServiceFramework{system_, "mnpp:web"} {}
-
- static constexpr auto functions = CreateStaticMap(
- FunctionInfo{0, nullptr, "Cmd0"},
- FunctionInfo{1, nullptr, "Cmd1"},
- FunctionInfo{10, nullptr, "Cmd10"},
- FunctionInfo{20, nullptr, "Cmd20"},
- FunctionInfo{100, nullptr, "Cmd100"}
- );
- std::optional<FunctionInfoBase> FindRequest(u32 key) override {
- return HandlerTableGenerateWithFind(key, functions);
+ explicit MNPP_WEB(Core::System& system_) : ServiceFramework{system_, "mnpp:web"} {
+ // clang-format off
+ static const FunctionInfo functions[] = {
+ {0, nullptr, "Cmd0"},
+ {1, nullptr, "Cmd1"},
+ {10, nullptr, "Cmd10"},
+ {20, nullptr, "Cmd20"},
+ {100, nullptr, "Cmd100"},
+ };
+ // clang-format on
+ RegisterHandlers(functions);
}
};