aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/service/ldr/ldr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/ldr/ldr.cpp')
-rw-r--r--src/core/hle/service/ldr/ldr.cpp53
1 files changed, 28 insertions, 25 deletions
diff --git a/src/core/hle/service/ldr/ldr.cpp b/src/core/hle/service/ldr/ldr.cpp
index 25ecc58fa4..db4d51b49d 100644
--- a/src/core/hle/service/ldr/ldr.cpp
+++ b/src/core/hle/service/ldr/ldr.cpp
@@ -12,44 +12,47 @@ namespace Service::LDR {
class DebugMonitor final : public ServiceFramework<DebugMonitor> {
public:
- explicit DebugMonitor(Core::System& system_) : ServiceFramework{system_, "ldr:dmnt"} {}
+ explicit DebugMonitor(Core::System& system_) : ServiceFramework{system_, "ldr:dmnt"} {
+ // clang-format off
+ static const FunctionInfo functions[] = {
+ {0, nullptr, "SetProgramArgument"},
+ {1, nullptr, "FlushArguments"},
+ {2, nullptr, "GetProcessModuleInfo"},
+ };
+ // clang-format on
- static constexpr auto functions = CreateStaticMap(
- FunctionInfo{0, nullptr, "SetProgramArgument"},
- FunctionInfo{1, nullptr, "FlushArguments"},
- FunctionInfo{2, nullptr, "GetProcessModuleInfo"}
- );
- std::optional<FunctionInfoBase> FindRequest(u32 key) override {
- return HandlerTableGenerateWithFind(key, functions);
+ RegisterHandlers(functions);
}
};
class ProcessManager final : public ServiceFramework<ProcessManager> {
public:
- explicit ProcessManager(Core::System& system_) : ServiceFramework{system_, "ldr:pm"} {}
+ explicit ProcessManager(Core::System& system_) : ServiceFramework{system_, "ldr:pm"} {
+ // clang-format off
+ static const FunctionInfo functions[] = {
+ {0, nullptr, "CreateProcess"},
+ {1, nullptr, "GetProgramInfo"},
+ {2, nullptr, "PinProgram"},
+ {3, nullptr, "UnpinProgram"},
+ {4, nullptr, "SetEnabledProgramVerification"},
+ };
+ // clang-format on
- static constexpr auto functions = CreateStaticMap(
- FunctionInfo{0, nullptr, "CreateProcess"},
- FunctionInfo{1, nullptr, "GetProgramInfo"},
- FunctionInfo{2, nullptr, "PinProgram"},
- FunctionInfo{3, nullptr, "UnpinProgram"},
- FunctionInfo{4, nullptr, "SetEnabledProgramVerification"}
- );
- std::optional<FunctionInfoBase> FindRequest(u32 key) override {
- return HandlerTableGenerateWithFind(key, functions);
+ RegisterHandlers(functions);
}
};
class Shell final : public ServiceFramework<Shell> {
public:
- explicit Shell(Core::System& system_) : ServiceFramework{system_, "ldr:shel"} {}
+ explicit Shell(Core::System& system_) : ServiceFramework{system_, "ldr:shel"} {
+ // clang-format off
+ static const FunctionInfo functions[] = {
+ {0, nullptr, "SetProgramArgument"},
+ {1, nullptr, "FlushArguments"},
+ };
+ // clang-format on
- static constexpr auto functions = CreateStaticMap(
- FunctionInfo{0, nullptr, "SetProgramArgument"},
- FunctionInfo{1, nullptr, "FlushArguments"}
- );
- std::optional<FunctionInfoBase> FindRequest(u32 key) override {
- return HandlerTableGenerateWithFind(key, functions);
+ RegisterHandlers(functions);
}
};