mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-09-25 18:55:57 +00:00
33a6f339a2
Signed-off-by: lizzie <lizzie@eden-emu.dev>
56 lines
1.8 KiB
C++
56 lines
1.8 KiB
C++
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#include <memory>
|
|
|
|
#include "core/core.h"
|
|
#include "core/hle/service/ptm/psm.h"
|
|
#include "core/hle/service/ptm/ptm.h"
|
|
#include "core/hle/service/ptm/ts.h"
|
|
#include "core/hle/service/server_manager.h"
|
|
|
|
namespace Service::PTM {
|
|
|
|
class PSM_MANU final : public ServiceFramework<PSM_MANU> {
|
|
public:
|
|
explicit PSM_MANU(Core::System& system_)
|
|
: ServiceFramework{system_, "psm:manu"} {}
|
|
|
|
FunctionInfoBase const* FindRequest(u32 key) override {
|
|
return HandlerTableGenerateWithFind(key,
|
|
FunctionInfo{0, nullptr, "EnableVdd50StateControl"},
|
|
FunctionInfo{1, nullptr, "DisableVdd50StateControl"},
|
|
FunctionInfo{2, nullptr, "SetVdd50State"}
|
|
);
|
|
}
|
|
};
|
|
|
|
class POWCTL final : public ServiceFramework<POWCTL> {
|
|
public:
|
|
explicit POWCTL(Core::System& system_)
|
|
: ServiceFramework{system_, "powctl"} {}
|
|
|
|
FunctionInfoBase const* FindRequest(u32 key) override {
|
|
return HandlerTableGenerateWithFind(key,
|
|
FunctionInfo{0, nullptr, "OpenSession"}
|
|
);
|
|
}
|
|
};
|
|
|
|
void LoopProcess(Core::System& system) {
|
|
auto server_manager = std::make_unique<ServerManager>(system);
|
|
|
|
server_manager->RegisterNamedService("psm", std::make_shared<PSM>(system));
|
|
if (1 /* not retail */) {
|
|
server_manager->RegisterNamedService("psm:manu", std::make_shared<PSM_MANU>(system));
|
|
server_manager->RegisterNamedService("powctl", std::make_shared<POWCTL>(system));
|
|
}
|
|
server_manager->RegisterNamedService("ts", std::make_shared<TS>(system));
|
|
ServerManager::RunServer(std::move(server_manager));
|
|
}
|
|
|
|
} // namespace Service::PTM
|