summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/hle/service/am/applet_oe.cpp57
1 files changed, 55 insertions, 2 deletions
diff --git a/src/core/hle/service/am/applet_oe.cpp b/src/core/hle/service/am/applet_oe.cpp
index f3d66ea96..f65d6b9f5 100644
--- a/src/core/hle/service/am/applet_oe.cpp
+++ b/src/core/hle/service/am/applet_oe.cpp
@@ -52,7 +52,23 @@ public:
52 52
53class ISelfController final : public ServiceFramework<ISelfController> { 53class ISelfController final : public ServiceFramework<ISelfController> {
54public: 54public:
55 ISelfController() : ServiceFramework("ISelfController") {} 55 ISelfController() : ServiceFramework("ISelfController") {
56 static const FunctionInfo functions[] = {
57 {13, &ISelfController::SetFocusHandlingMode, "SetFocusHandlingMode"},
58 };
59 RegisterHandlers(functions);
60 }
61
62private:
63 void SetFocusHandlingMode(Kernel::HLERequestContext& ctx) {
64 // Takes 3 input u8s with each field located immediately after the previous u8, these are
65 // bool flags. No output.
66
67 IPC::RequestBuilder rb{ctx, 2};
68 rb.Push(RESULT_SUCCESS);
69
70 LOG_WARNING(Service, "(STUBBED) called");
71 }
56}; 72};
57 73
58class ICommonStateGetter final : public ServiceFramework<ICommonStateGetter> { 74class ICommonStateGetter final : public ServiceFramework<ICommonStateGetter> {
@@ -61,6 +77,7 @@ public:
61 static const FunctionInfo functions[] = { 77 static const FunctionInfo functions[] = {
62 {0, &ICommonStateGetter::GetEventHandle, "GetEventHandle"}, 78 {0, &ICommonStateGetter::GetEventHandle, "GetEventHandle"},
63 {1, &ICommonStateGetter::ReceiveMessage, "ReceiveMessage"}, 79 {1, &ICommonStateGetter::ReceiveMessage, "ReceiveMessage"},
80 {9, &ICommonStateGetter::GetCurrentFocusState, "GetCurrentFocusState"},
64 }; 81 };
65 RegisterHandlers(functions); 82 RegisterHandlers(functions);
66 83
@@ -86,12 +103,39 @@ private:
86 LOG_WARNING(Service, "(STUBBED) called"); 103 LOG_WARNING(Service, "(STUBBED) called");
87 } 104 }
88 105
106 void GetCurrentFocusState(Kernel::HLERequestContext& ctx) {
107 IPC::RequestBuilder rb{ctx, 3};
108 rb.Push(RESULT_SUCCESS);
109 rb.Push<u32>(1); // 1: In focus, 2/3: Out of focus(running in "background")
110
111 LOG_WARNING(Service, "(STUBBED) called");
112 }
113
89 Kernel::SharedPtr<Kernel::Event> event; 114 Kernel::SharedPtr<Kernel::Event> event;
90}; 115};
91 116
92class IApplicationFunctions final : public ServiceFramework<IApplicationFunctions> { 117class IApplicationFunctions final : public ServiceFramework<IApplicationFunctions> {
93public: 118public:
94 IApplicationFunctions() : ServiceFramework("IApplicationFunctions") {} 119 IApplicationFunctions() : ServiceFramework("IApplicationFunctions") {
120 static const FunctionInfo functions[] = {
121 {22, &IApplicationFunctions::SetTerminateResult, "SetTerminateResult"},
122 };
123 RegisterHandlers(functions);
124 }
125
126private:
127 void SetTerminateResult(Kernel::HLERequestContext& ctx) {
128 // Takes an input u32 Result, no output.
129 // For example, in some cases official apps use this with error 0x2A2 then uses svcBreak.
130
131 IPC::RequestParser rp{ctx};
132 u32 result = rp.Pop<u32>();
133
134 IPC::RequestBuilder rb{ctx, 2};
135 rb.Push(RESULT_SUCCESS);
136
137 LOG_WARNING(Service, "(STUBBED) called, result=0x%08X", result);
138 }
95}; 139};
96 140
97class ILibraryAppletCreator final : public ServiceFramework<ILibraryAppletCreator> { 141class ILibraryAppletCreator final : public ServiceFramework<ILibraryAppletCreator> {
@@ -120,48 +164,56 @@ private:
120 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 164 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
121 rb.Push(RESULT_SUCCESS); 165 rb.Push(RESULT_SUCCESS);
122 rb.PushIpcInterface<IAudioController>(); 166 rb.PushIpcInterface<IAudioController>();
167 LOG_DEBUG(Service, "called");
123 } 168 }
124 169
125 void GetDisplayController(Kernel::HLERequestContext& ctx) { 170 void GetDisplayController(Kernel::HLERequestContext& ctx) {
126 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 171 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
127 rb.Push(RESULT_SUCCESS); 172 rb.Push(RESULT_SUCCESS);
128 rb.PushIpcInterface<IDisplayController>(); 173 rb.PushIpcInterface<IDisplayController>();
174 LOG_DEBUG(Service, "called");
129 } 175 }
130 176
131 void GetDebugFunctions(Kernel::HLERequestContext& ctx) { 177 void GetDebugFunctions(Kernel::HLERequestContext& ctx) {
132 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 178 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
133 rb.Push(RESULT_SUCCESS); 179 rb.Push(RESULT_SUCCESS);
134 rb.PushIpcInterface<IDebugFunctions>(); 180 rb.PushIpcInterface<IDebugFunctions>();
181 LOG_DEBUG(Service, "called");
135 } 182 }
136 183
137 void GetWindowController(Kernel::HLERequestContext& ctx) { 184 void GetWindowController(Kernel::HLERequestContext& ctx) {
138 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 185 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
139 rb.Push(RESULT_SUCCESS); 186 rb.Push(RESULT_SUCCESS);
140 rb.PushIpcInterface<IWindowController>(); 187 rb.PushIpcInterface<IWindowController>();
188 LOG_DEBUG(Service, "called");
141 } 189 }
142 190
143 void GetSelfController(Kernel::HLERequestContext& ctx) { 191 void GetSelfController(Kernel::HLERequestContext& ctx) {
144 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 192 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
145 rb.Push(RESULT_SUCCESS); 193 rb.Push(RESULT_SUCCESS);
146 rb.PushIpcInterface<ISelfController>(); 194 rb.PushIpcInterface<ISelfController>();
195 LOG_DEBUG(Service, "called");
147 } 196 }
148 197
149 void GetCommonStateGetter(Kernel::HLERequestContext& ctx) { 198 void GetCommonStateGetter(Kernel::HLERequestContext& ctx) {
150 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 199 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
151 rb.Push(RESULT_SUCCESS); 200 rb.Push(RESULT_SUCCESS);
152 rb.PushIpcInterface<ICommonStateGetter>(); 201 rb.PushIpcInterface<ICommonStateGetter>();
202 LOG_DEBUG(Service, "called");
153 } 203 }
154 204
155 void GetLibraryAppletCreator(Kernel::HLERequestContext& ctx) { 205 void GetLibraryAppletCreator(Kernel::HLERequestContext& ctx) {
156 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 206 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
157 rb.Push(RESULT_SUCCESS); 207 rb.Push(RESULT_SUCCESS);
158 rb.PushIpcInterface<ILibraryAppletCreator>(); 208 rb.PushIpcInterface<ILibraryAppletCreator>();
209 LOG_DEBUG(Service, "called");
159 } 210 }
160 211
161 void GetApplicationFunctions(Kernel::HLERequestContext& ctx) { 212 void GetApplicationFunctions(Kernel::HLERequestContext& ctx) {
162 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 213 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
163 rb.Push(RESULT_SUCCESS); 214 rb.Push(RESULT_SUCCESS);
164 rb.PushIpcInterface<IApplicationFunctions>(); 215 rb.PushIpcInterface<IApplicationFunctions>();
216 LOG_DEBUG(Service, "called");
165 } 217 }
166}; 218};
167 219
@@ -169,6 +221,7 @@ void AppletOE::OpenApplicationProxy(Kernel::HLERequestContext& ctx) {
169 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 221 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
170 rb.Push(RESULT_SUCCESS); 222 rb.Push(RESULT_SUCCESS);
171 rb.PushIpcInterface<IApplicationProxy>(); 223 rb.PushIpcInterface<IApplicationProxy>();
224 LOG_DEBUG(Service, "called");
172} 225}
173 226
174AppletOE::AppletOE() : ServiceFramework("appletOE") { 227AppletOE::AppletOE() : ServiceFramework("appletOE") {