mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-10-28 18:34:19 +00:00
This reverts commit 218c6705d9.
- [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>
This commit is contained in:
@@ -47,7 +47,13 @@ void GetApplicationPidGeneric(Kernel::KernelCore& kernel, HLERequestContext& ctx
|
||||
|
||||
class BootMode final : public ServiceFramework<BootMode> {
|
||||
public:
|
||||
explicit BootMode(Core::System& system_) : ServiceFramework{system_, "pm:bm"} {}
|
||||
explicit BootMode(Core::System& system_) : ServiceFramework{system_, "pm:bm"} {
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, &BootMode::GetBootMode, "GetBootMode"},
|
||||
{1, &BootMode::SetMaintenanceBoot, "SetMaintenanceBoot"},
|
||||
};
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
private:
|
||||
void GetBootMode(HLERequestContext& ctx) {
|
||||
@@ -67,19 +73,28 @@ private:
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
std::optional<FunctionInfoBase> FindRequest(u32 key) override {
|
||||
return HandlerTableGenerateWithFind(key, functions);
|
||||
}
|
||||
static constexpr auto functions = CreateStaticMap(
|
||||
FunctionInfo{0, &BootMode::GetBootMode, "GetBootMode"},
|
||||
FunctionInfo{1, &BootMode::SetMaintenanceBoot, "SetMaintenanceBoot"}
|
||||
);
|
||||
SystemBootMode boot_mode = SystemBootMode::Normal;
|
||||
};
|
||||
|
||||
class DebugMonitor final : public ServiceFramework<DebugMonitor> {
|
||||
public:
|
||||
explicit DebugMonitor(Core::System& system_) : ServiceFramework{system_, "pm:dmnt"} {}
|
||||
explicit DebugMonitor(Core::System& system_) : ServiceFramework{system_, "pm:dmnt"} {
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, nullptr, "GetJitDebugProcessIdList"},
|
||||
{1, nullptr, "StartProcess"},
|
||||
{2, &DebugMonitor::GetProcessId, "GetProcessId"},
|
||||
{3, nullptr, "HookToCreateProcess"},
|
||||
{4, &DebugMonitor::GetApplicationProcessId, "GetApplicationProcessId"},
|
||||
{5, nullptr, "HookToCreateApplicationProgress"},
|
||||
{6, nullptr, "ClearHook"},
|
||||
{65000, &DebugMonitor::AtmosphereGetProcessInfo, "AtmosphereGetProcessInfo"},
|
||||
{65001, nullptr, "AtmosphereGetCurrentLimitInfo"},
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
private:
|
||||
void GetProcessId(HLERequestContext& ctx) {
|
||||
@@ -149,26 +164,19 @@ private:
|
||||
rb.PushRaw(program_location);
|
||||
rb.PushRaw(override_status);
|
||||
}
|
||||
|
||||
std::optional<FunctionInfoBase> FindRequest(u32 key) override {
|
||||
return HandlerTableGenerateWithFind(key, functions);
|
||||
}
|
||||
static constexpr auto functions = CreateStaticMap(
|
||||
FunctionInfo{0, nullptr, "GetJitDebugProcessIdList"},
|
||||
FunctionInfo{1, nullptr, "StartProcess"},
|
||||
FunctionInfo{2, &DebugMonitor::GetProcessId, "GetProcessId"},
|
||||
FunctionInfo{3, nullptr, "HookToCreateProcess"},
|
||||
FunctionInfo{4, &DebugMonitor::GetApplicationProcessId, "GetApplicationProcessId"},
|
||||
FunctionInfo{5, nullptr, "HookToCreateApplicationProgress"},
|
||||
FunctionInfo{6, nullptr, "ClearHook"},
|
||||
FunctionInfo{65000, &DebugMonitor::AtmosphereGetProcessInfo, "AtmosphereGetProcessInfo"},
|
||||
FunctionInfo{65001, nullptr, "AtmosphereGetCurrentLimitInfo"}
|
||||
);
|
||||
};
|
||||
|
||||
class Info final : public ServiceFramework<Info> {
|
||||
public:
|
||||
explicit Info(Core::System& system_) : ServiceFramework{system_, "pm:info"} {}
|
||||
explicit Info(Core::System& system_) : ServiceFramework{system_, "pm:info"} {
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, &Info::GetProgramId, "GetProgramId"},
|
||||
{65000, &Info::AtmosphereGetProcessId, "AtmosphereGetProcessId"},
|
||||
{65001, nullptr, "AtmosphereHasLaunchedProgram"},
|
||||
{65002, nullptr, "AtmosphereGetProcessInfo"},
|
||||
};
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
private:
|
||||
void GetProgramId(HLERequestContext& ctx) {
|
||||
@@ -210,24 +218,27 @@ private:
|
||||
rb.Push(ResultSuccess);
|
||||
rb.Push(process->GetProcessId());
|
||||
}
|
||||
|
||||
std::optional<FunctionInfoBase> FindRequest(u32 key) override {
|
||||
return HandlerTableGenerateWithFind(key, functions);
|
||||
}
|
||||
static constexpr auto functions = CreateStaticMap(
|
||||
FunctionInfo{0, &Info::GetProgramId, "GetProgramId"},
|
||||
FunctionInfo{65000, &Info::AtmosphereGetProcessId, "AtmosphereGetProcessId"},
|
||||
FunctionInfo{65001, nullptr, "AtmosphereHasLaunchedProgram"},
|
||||
FunctionInfo{65002, nullptr, "AtmosphereGetProcessInfo"}
|
||||
);
|
||||
};
|
||||
|
||||
class Shell final : public ServiceFramework<Shell> {
|
||||
public:
|
||||
explicit Shell(Core::System& system_) : ServiceFramework{system_, "pm:shell"} {}
|
||||
explicit Shell(Core::System& system_) : ServiceFramework{system_, "pm:shell"} {
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, nullptr, "LaunchProgram"},
|
||||
{1, nullptr, "TerminateProcess"},
|
||||
{2, nullptr, "TerminateProgram"},
|
||||
{3, nullptr, "GetProcessEventHandle"},
|
||||
{4, nullptr, "GetProcessEventInfo"},
|
||||
{5, nullptr, "NotifyBootFinished"},
|
||||
{6, &Shell::GetApplicationProcessIdForShell, "GetApplicationProcessIdForShell"},
|
||||
{7, nullptr, "BoostSystemMemoryResourceLimit"},
|
||||
{8, nullptr, "BoostApplicationThreadResourceLimit"},
|
||||
{9, nullptr, "GetBootFinishedEventHandle"},
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
std::optional<FunctionInfoBase> FindRequest(u32 key) override {
|
||||
return HandlerTableGenerateWithFind(key, functions);
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -236,19 +247,6 @@ private:
|
||||
auto list = kernel.GetProcessList();
|
||||
GetApplicationPidGeneric(system.Kernel(), ctx, list);
|
||||
}
|
||||
|
||||
static constexpr auto functions = CreateStaticMap(
|
||||
FunctionInfo{0, nullptr, "LaunchProgram"},
|
||||
FunctionInfo{1, nullptr, "TerminateProcess"},
|
||||
FunctionInfo{2, nullptr, "TerminateProgram"},
|
||||
FunctionInfo{3, nullptr, "GetProcessEventHandle"},
|
||||
FunctionInfo{4, nullptr, "GetProcessEventInfo"},
|
||||
FunctionInfo{5, nullptr, "NotifyBootFinished"},
|
||||
FunctionInfo{6, &Shell::GetApplicationProcessIdForShell, "GetApplicationProcessIdForShell"},
|
||||
FunctionInfo{7, nullptr, "BoostSystemMemoryResourceLimit"},
|
||||
FunctionInfo{8, nullptr, "BoostApplicationThreadResourceLimit"},
|
||||
FunctionInfo{9, nullptr, "GetBootFinishedEventHandle"}
|
||||
);
|
||||
};
|
||||
|
||||
void LoopProcess(Core::System& system) {
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user