mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-20 14:57:55 +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>
90 lines
2.5 KiB
C++
90 lines
2.5 KiB
C++
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#include "core/hle/service/glue/ectx.h"
|
|
#include "core/hle/service/ipc_helpers.h"
|
|
|
|
namespace Service::Glue {
|
|
|
|
// This is nn::err::context::IContextRegistrar
|
|
class IContextRegistrar : public ServiceFramework<IContextRegistrar> {
|
|
public:
|
|
IContextRegistrar(Core::System& system_) : ServiceFramework{system_, "IContextRegistrar"} {
|
|
// clang-format off
|
|
static const FunctionInfo functions[] = {
|
|
{0, &IContextRegistrar::Complete, "Complete"},
|
|
};
|
|
// clang-format on
|
|
|
|
RegisterHandlers(functions);
|
|
}
|
|
|
|
~IContextRegistrar() override = default;
|
|
|
|
private:
|
|
void Complete(HLERequestContext& ctx) {
|
|
struct InputParameters {
|
|
u32 unk;
|
|
};
|
|
struct OutputParameters {
|
|
u32 unk;
|
|
};
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
[[maybe_unused]] auto input = rp.PopRaw<InputParameters>();
|
|
[[maybe_unused]] auto value = ctx.ReadBuffer();
|
|
|
|
IPC::ResponseBuilder rb{ctx, 3};
|
|
rb.Push(ResultSuccess);
|
|
rb.Push(0);
|
|
}
|
|
};
|
|
|
|
ECTX_W::ECTX_W(Core::System& system_) : ServiceFramework{system_, "ectx:w"} {
|
|
// clang-format off
|
|
static const FunctionInfo functions[] = {
|
|
{0, nullptr, "CreateContextRegistrar"},
|
|
{1, nullptr, "CommitContext"},
|
|
{2, nullptr, "RemoveContext"},
|
|
};
|
|
// clang-format on
|
|
RegisterHandlers(functions);
|
|
}
|
|
ECTX_W::~ECTX_W() = default;
|
|
|
|
ECTX_R::ECTX_R(Core::System& system_) : ServiceFramework{system_, "ectx:r"} {
|
|
// clang-format off
|
|
static const FunctionInfo functions[] = {
|
|
{0, nullptr, "GetContextInfo"},
|
|
{1, nullptr, "PullContext"},
|
|
{2, nullptr, "ListContextDescriptorWithResultForDebug"},
|
|
};
|
|
// clang-format on
|
|
RegisterHandlers(functions);
|
|
}
|
|
ECTX_R::~ECTX_R() = default;
|
|
|
|
ECTX_AW::ECTX_AW(Core::System& system_) : ServiceFramework{system_, "ectx:aw"} {
|
|
// clang-format off
|
|
static const FunctionInfo functions[] = {
|
|
{0, &ECTX_AW::CreateContextRegistrar, "CreateContextRegistrar"},
|
|
{1, nullptr, "CommitContext"},
|
|
};
|
|
// clang-format on
|
|
|
|
RegisterHandlers(functions);
|
|
}
|
|
|
|
ECTX_AW::~ECTX_AW() = default;
|
|
|
|
void ECTX_AW::CreateContextRegistrar(HLERequestContext& ctx) {
|
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
|
rb.Push(ResultSuccess);
|
|
rb.PushIpcInterface<IContextRegistrar>(ctx, system);
|
|
}
|
|
|
|
} // namespace Service::Glue
|