mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-23 07:56:52 +00:00
a41a98028a
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>
58 lines
1.8 KiB
C++
58 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"} {
|
|
// clang-format off
|
|
static const FunctionInfo functions[] = {
|
|
{0, nullptr, "EnableVdd50StateControl"},
|
|
{1, nullptr, "DisableVdd50StateControl"},
|
|
{2, nullptr, "SetVdd50State"},
|
|
};
|
|
// clang-format on
|
|
RegisterHandlers(functions);
|
|
}
|
|
};
|
|
|
|
class POWCTL final : public ServiceFramework<POWCTL> {
|
|
public:
|
|
explicit POWCTL(Core::System& system_)
|
|
: ServiceFramework{system_, "powctl"} {
|
|
// clang-format off
|
|
static const FunctionInfo functions[] = {
|
|
{0, nullptr, "OpenSession"},
|
|
};
|
|
// clang-format on
|
|
RegisterHandlers(functions);
|
|
}
|
|
};
|
|
|
|
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
|