summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/apt/apt.cpp15
-rw-r--r--src/core/hle/service/apt/apt.h6
2 files changed, 17 insertions, 4 deletions
diff --git a/src/core/hle/service/apt/apt.cpp b/src/core/hle/service/apt/apt.cpp
index 9cfb7f71e..987fb0992 100644
--- a/src/core/hle/service/apt/apt.cpp
+++ b/src/core/hle/service/apt/apt.cpp
@@ -192,6 +192,13 @@ void SendParameter(Service::Interface* self) {
192 192
193 IPC::RequestBuilder rb = rp.MakeBuilder(1, 0); 193 IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
194 194
195 // A new parameter can not be sent if the previous one hasn't been consumed yet
196 if (next_parameter) {
197 rb.Push(ResultCode(ErrCodes::ParameterPresent, ErrorModule::Applet,
198 ErrorSummary::InvalidState, ErrorLevel::Status));
199 return;
200 }
201
195 if (dest_applet == nullptr) { 202 if (dest_applet == nullptr) {
196 LOG_ERROR(Service_APT, "Unknown applet id=0x%08X", dst_app_id); 203 LOG_ERROR(Service_APT, "Unknown applet id=0x%08X", dst_app_id);
197 rb.Push<u32>(-1); // TODO(Subv): Find the right error code 204 rb.Push<u32>(-1); // TODO(Subv): Find the right error code
@@ -208,10 +215,10 @@ void SendParameter(Service::Interface* self) {
208 215
209 rb.Push(dest_applet->ReceiveParameter(param)); 216 rb.Push(dest_applet->ReceiveParameter(param));
210 217
211 LOG_WARNING(Service_APT, 218 LOG_DEBUG(Service_APT,
212 "(STUBBED) called src_app_id=0x%08X, dst_app_id=0x%08X, signal_type=0x%08X," 219 "called src_app_id=0x%08X, dst_app_id=0x%08X, signal_type=0x%08X,"
213 "buffer_size=0x%08X, handle=0x%08X, size=0x%08zX, in_param_buffer_ptr=0x%08X", 220 "buffer_size=0x%08X, handle=0x%08X, size=0x%08zX, in_param_buffer_ptr=0x%08X",
214 src_app_id, dst_app_id, signal_type, buffer_size, handle, size, buffer); 221 src_app_id, dst_app_id, signal_type, buffer_size, handle, size, buffer);
215} 222}
216 223
217void ReceiveParameter(Service::Interface* self) { 224void ReceiveParameter(Service::Interface* self) {
diff --git a/src/core/hle/service/apt/apt.h b/src/core/hle/service/apt/apt.h
index ee80926d2..106754853 100644
--- a/src/core/hle/service/apt/apt.h
+++ b/src/core/hle/service/apt/apt.h
@@ -116,6 +116,12 @@ enum class ScreencapPostPermission : u32 {
116 DisableScreenshotPostingToMiiverse = 3 116 DisableScreenshotPostingToMiiverse = 3
117}; 117};
118 118
119namespace ErrCodes {
120enum {
121 ParameterPresent = 2,
122};
123}
124
119/// Send a parameter to the currently-running application, which will read it via ReceiveParameter 125/// Send a parameter to the currently-running application, which will read it via ReceiveParameter
120void SendParameter(const MessageParameter& parameter); 126void SendParameter(const MessageParameter& parameter);
121 127