summaryrefslogtreecommitdiff
path: root/src/core/hle/service/glue
diff options
context:
space:
mode:
authorGravatar Liam2023-07-22 23:29:45 -0400
committerGravatar Liam2023-07-22 23:29:45 -0400
commit3e3294e1c25ab67f967d63c1232c579ad3c1e90b (patch)
treeac3b16adef97a2a4e6bbb38141b2dd76bf0887c1 /src/core/hle/service/glue
parentMerge pull request #11042 from lat9nq/wayland-appimage (diff)
downloadyuzu-3e3294e1c25ab67f967d63c1232c579ad3c1e90b.tar.gz
yuzu-3e3294e1c25ab67f967d63c1232c579ad3c1e90b.tar.xz
yuzu-3e3294e1c25ab67f967d63c1232c579ad3c1e90b.zip
core: implement GetGaiStringErrorRequest, IContextRegistrar
Diffstat (limited to 'src/core/hle/service/glue')
-rw-r--r--src/core/hle/service/glue/ectx.cpp43
-rw-r--r--src/core/hle/service/glue/ectx.h3
2 files changed, 45 insertions, 1 deletions
diff --git a/src/core/hle/service/glue/ectx.cpp b/src/core/hle/service/glue/ectx.cpp
index 1bd9314ae..6f71b62f3 100644
--- a/src/core/hle/service/glue/ectx.cpp
+++ b/src/core/hle/service/glue/ectx.cpp
@@ -2,13 +2,48 @@
2// SPDX-License-Identifier: GPL-2.0-or-later 2// SPDX-License-Identifier: GPL-2.0-or-later
3 3
4#include "core/hle/service/glue/ectx.h" 4#include "core/hle/service/glue/ectx.h"
5#include "core/hle/service/ipc_helpers.h"
5 6
6namespace Service::Glue { 7namespace Service::Glue {
7 8
9// This is nn::err::context::IContextRegistrar
10class IContextRegistrar : public ServiceFramework<IContextRegistrar> {
11public:
12 IContextRegistrar(Core::System& system_) : ServiceFramework{system_, "IContextRegistrar"} {
13 // clang-format off
14 static const FunctionInfo functions[] = {
15 {0, &IContextRegistrar::Complete, "Complete"},
16 };
17 // clang-format on
18
19 RegisterHandlers(functions);
20 }
21
22 ~IContextRegistrar() override = default;
23
24private:
25 void Complete(HLERequestContext& ctx) {
26 struct InputParameters {
27 u32 unk;
28 };
29 struct OutputParameters {
30 u32 unk;
31 };
32
33 IPC::RequestParser rp{ctx};
34 [[maybe_unused]] auto input = rp.PopRaw<InputParameters>();
35 [[maybe_unused]] auto value = ctx.ReadBuffer();
36
37 IPC::ResponseBuilder rb{ctx, 3};
38 rb.Push(ResultSuccess);
39 rb.Push(0);
40 }
41};
42
8ECTX_AW::ECTX_AW(Core::System& system_) : ServiceFramework{system_, "ectx:aw"} { 43ECTX_AW::ECTX_AW(Core::System& system_) : ServiceFramework{system_, "ectx:aw"} {
9 // clang-format off 44 // clang-format off
10 static const FunctionInfo functions[] = { 45 static const FunctionInfo functions[] = {
11 {0, nullptr, "CreateContextRegistrar"}, 46 {0, &ECTX_AW::CreateContextRegistrar, "CreateContextRegistrar"},
12 {1, nullptr, "CommitContext"}, 47 {1, nullptr, "CommitContext"},
13 }; 48 };
14 // clang-format on 49 // clang-format on
@@ -18,4 +53,10 @@ ECTX_AW::ECTX_AW(Core::System& system_) : ServiceFramework{system_, "ectx:aw"} {
18 53
19ECTX_AW::~ECTX_AW() = default; 54ECTX_AW::~ECTX_AW() = default;
20 55
56void ECTX_AW::CreateContextRegistrar(HLERequestContext& ctx) {
57 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
58 rb.Push(ResultSuccess);
59 rb.PushIpcInterface<IContextRegistrar>(std::make_shared<IContextRegistrar>(system));
60}
61
21} // namespace Service::Glue 62} // namespace Service::Glue
diff --git a/src/core/hle/service/glue/ectx.h b/src/core/hle/service/glue/ectx.h
index a608de053..ffa74d8d3 100644
--- a/src/core/hle/service/glue/ectx.h
+++ b/src/core/hle/service/glue/ectx.h
@@ -15,6 +15,9 @@ class ECTX_AW final : public ServiceFramework<ECTX_AW> {
15public: 15public:
16 explicit ECTX_AW(Core::System& system_); 16 explicit ECTX_AW(Core::System& system_);
17 ~ECTX_AW() override; 17 ~ECTX_AW() override;
18
19private:
20 void CreateContextRegistrar(HLERequestContext& ctx);
18}; 21};
19 22
20} // namespace Service::Glue 23} // namespace Service::Glue