summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2017-12-29 00:44:46 -0500
committerGravatar bunnei2017-12-29 00:44:46 -0500
commit1d01ffccb8a3435d092ab61b4043b41dc5a70eaa (patch)
tree8ee17815941705b1999fb6f2c19180a934962ffa /src
parentcontroller: Implement DuplicateSession. (diff)
downloadyuzu-1d01ffccb8a3435d092ab61b4043b41dc5a70eaa.tar.gz
yuzu-1d01ffccb8a3435d092ab61b4043b41dc5a70eaa.tar.xz
yuzu-1d01ffccb8a3435d092ab61b4043b41dc5a70eaa.zip
applet_oe: Stub out a bunch of interfaces necessary for boot.
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/am/applet_oe.cpp156
-rw-r--r--src/core/hle/service/am/applet_oe.h4
2 files changed, 159 insertions, 1 deletions
diff --git a/src/core/hle/service/am/applet_oe.cpp b/src/core/hle/service/am/applet_oe.cpp
index cd8901d2f..6fe7bdce5 100644
--- a/src/core/hle/service/am/applet_oe.cpp
+++ b/src/core/hle/service/am/applet_oe.cpp
@@ -4,14 +4,168 @@
4 4
5#include "common/logging/log.h" 5#include "common/logging/log.h"
6#include "core/hle/ipc_helpers.h" 6#include "core/hle/ipc_helpers.h"
7#include "core/hle/kernel/event.h"
7#include "core/hle/service/am/applet_oe.h" 8#include "core/hle/service/am/applet_oe.h"
8 9
9namespace Service { 10namespace Service {
10namespace AM { 11namespace AM {
11 12
13class IWindowController final : public ServiceFramework<IWindowController> {
14public:
15 IWindowController() : ServiceFramework("IWindowController") {
16 static const FunctionInfo functions[] = {
17 {1, &IWindowController::GetAppletResourceUserId, "GetAppletResourceUserId"},
18 {10, &IWindowController::AcquireForegroundRights, "AcquireForegroundRights"},
19 };
20 RegisterHandlers(functions);
21 }
22
23private:
24 void GetAppletResourceUserId(Kernel::HLERequestContext& ctx) {
25 LOG_WARNING(Service, "(STUBBED) called");
26 IPC::RequestBuilder rb{ctx, 3};
27 rb.Push(RESULT_SUCCESS);
28 rb.Push<u64>(0);
29 }
30
31 void AcquireForegroundRights(Kernel::HLERequestContext& ctx) {
32 LOG_WARNING(Service, "(STUBBED) called");
33 IPC::RequestBuilder rb{ctx, 1};
34 rb.Push(RESULT_SUCCESS);
35 }
36};
37
38class IAudioController final : public ServiceFramework<IAudioController> {
39public:
40 IAudioController() : ServiceFramework("IAudioController") {}
41};
42
43class IDisplayController final : public ServiceFramework<IDisplayController> {
44public:
45 IDisplayController() : ServiceFramework("IDisplayController") {}
46};
47
48class IDebugFunctions final : public ServiceFramework<IDebugFunctions> {
49public:
50 IDebugFunctions() : ServiceFramework("IDebugFunctions") {}
51};
52
53class ISelfController final : public ServiceFramework<ISelfController> {
54public:
55 ISelfController() : ServiceFramework("ISelfController") {}
56};
57
58class ICommonStateGetter final : public ServiceFramework<ICommonStateGetter> {
59public:
60 ICommonStateGetter() : ServiceFramework("ICommonStateGetter") {
61 static const FunctionInfo functions[] = {
62 {0, &ICommonStateGetter::GetEventHandle, "GetEventHandle"},
63 {1, &ICommonStateGetter::ReceiveMessage, "ReceiveMessage"},
64 };
65 RegisterHandlers(functions);
66
67 event = Kernel::Event::Create(Kernel::ResetType::OneShot, "ICommonStateGetter:Event");
68 }
69
70private:
71 void GetEventHandle(Kernel::HLERequestContext& ctx) {
72 event->Signal();
73
74 IPC::RequestBuilder rb{ctx, 2, 1};
75 rb.Push(RESULT_SUCCESS);
76 rb.PushObjects(event);
77
78 LOG_WARNING(Service, "(STUBBED) called");
79 }
80
81 void ReceiveMessage(Kernel::HLERequestContext& ctx) {
82 IPC::RequestBuilder rb{ctx, 2};
83 rb.Push(RESULT_SUCCESS);
84 rb.Skip(1, true);
85 rb.Push<u32>(1);
86
87 LOG_WARNING(Service, "(STUBBED) called");
88 }
89
90 Kernel::SharedPtr<Kernel::Event> event;
91};
92
93class IApplicationFunctions final : public ServiceFramework<IApplicationFunctions> {
94public:
95 IApplicationFunctions() : ServiceFramework("IApplicationFunctions") {}
96};
97
98class ILibraryAppletCreator final : public ServiceFramework<ILibraryAppletCreator> {
99public:
100 ILibraryAppletCreator() : ServiceFramework("ILibraryAppletCreator") {}
101};
102
103class IApplicationProxy final : public ServiceFramework<IApplicationProxy> {
104public:
105 IApplicationProxy() : ServiceFramework("IApplicationProxy") {
106 static const FunctionInfo functions[] = {
107 {0, &IApplicationProxy::GetCommonStateGetter, "GetCommonStateGetter"},
108 {1, &IApplicationProxy::GetSelfController, "GetSelfController"},
109 {2, &IApplicationProxy::GetWindowController, "GetWindowController"},
110 {3, &IApplicationProxy::GetAudioController, "GetAudioController"},
111 {4, &IApplicationProxy::GetDisplayController, "GetDisplayController"},
112 {11, &IApplicationProxy::GetLibraryAppletCreator, "GetLibraryAppletCreator"},
113 {20, &IApplicationProxy::GetApplicationFunctions, "GetApplicationFunctions"},
114 {1000, &IApplicationProxy::GetDebugFunctions, "GetDebugFunctions"},
115 };
116 RegisterHandlers(functions);
117 }
118
119private:
120 void GetAudioController(Kernel::HLERequestContext& ctx) {
121 IPC::RequestBuilder rb{ctx, 1};
122 rb.PushIpcInterface<IAudioController>();
123 }
124
125 void GetDisplayController(Kernel::HLERequestContext& ctx) {
126 IPC::RequestBuilder rb{ctx, 1};
127 rb.PushIpcInterface<IDisplayController>();
128 }
129
130 void GetDebugFunctions(Kernel::HLERequestContext& ctx) {
131 IPC::RequestBuilder rb{ctx, 1};
132 rb.PushIpcInterface<IDebugFunctions>();
133 }
134
135 void GetWindowController(Kernel::HLERequestContext& ctx) {
136 IPC::RequestBuilder rb{ctx, 1};
137 rb.PushIpcInterface<IWindowController>();
138 }
139
140 void GetSelfController(Kernel::HLERequestContext& ctx) {
141 IPC::RequestBuilder rb{ctx, 1};
142 rb.PushIpcInterface<ISelfController>();
143 }
144
145 void GetCommonStateGetter(Kernel::HLERequestContext& ctx) {
146 IPC::RequestBuilder rb{ctx, 1};
147 rb.PushIpcInterface<ICommonStateGetter>();
148 }
149
150 void GetLibraryAppletCreator(Kernel::HLERequestContext& ctx) {
151 IPC::RequestBuilder rb{ctx, 1};
152 rb.PushIpcInterface<ILibraryAppletCreator>();
153 }
154
155 void GetApplicationFunctions(Kernel::HLERequestContext& ctx) {
156 IPC::RequestBuilder rb{ctx, 1};
157 rb.PushIpcInterface<IApplicationFunctions>();
158 }
159};
160
161void AppletOE::OpenApplicationProxy(Kernel::HLERequestContext& ctx) {
162 IPC::RequestBuilder rb{ctx, 1};
163 rb.PushIpcInterface<IApplicationProxy>();
164}
165
12AppletOE::AppletOE() : ServiceFramework("appletOE") { 166AppletOE::AppletOE() : ServiceFramework("appletOE") {
13 static const FunctionInfo functions[] = { 167 static const FunctionInfo functions[] = {
14 {0x00000000, nullptr, "OpenApplicationProxy"}, 168 {0x00000000, &AppletOE::OpenApplicationProxy, "OpenApplicationProxy"},
15 }; 169 };
16 RegisterHandlers(functions); 170 RegisterHandlers(functions);
17} 171}
diff --git a/src/core/hle/service/am/applet_oe.h b/src/core/hle/service/am/applet_oe.h
index 6e1173f01..899ba5570 100644
--- a/src/core/hle/service/am/applet_oe.h
+++ b/src/core/hle/service/am/applet_oe.h
@@ -4,6 +4,7 @@
4 4
5#pragma once 5#pragma once
6 6
7#include "core/hle/kernel/hle_ipc.h"
7#include "core/hle/service/service.h" 8#include "core/hle/service/service.h"
8 9
9namespace Service { 10namespace Service {
@@ -13,6 +14,9 @@ class AppletOE final : public ServiceFramework<AppletOE> {
13public: 14public:
14 AppletOE(); 15 AppletOE();
15 ~AppletOE() = default; 16 ~AppletOE() = default;
17
18private:
19 void OpenApplicationProxy(Kernel::HLERequestContext& ctx);
16}; 20};
17 21
18} // namespace AM 22} // namespace AM