summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Sebastian Valle2018-05-19 17:03:30 -0500
committerGravatar GitHub2018-05-19 17:03:30 -0500
commit353e1dd7e43e06b3607a6bd07e93ed2e0da2fcfc (patch)
tree0a2fe597d4270bbf37d0bd4b008faf8723ec1a7f /src
parentAdd and correct some Error Modules (#444) (diff)
parentAdded RequestWithContext & ControlWithContext (diff)
downloadyuzu-353e1dd7e43e06b3607a6bd07e93ed2e0da2fcfc.tar.gz
yuzu-353e1dd7e43e06b3607a6bd07e93ed2e0da2fcfc.tar.xz
yuzu-353e1dd7e43e06b3607a6bd07e93ed2e0da2fcfc.zip
Merge pull request #443 from ogniK5377/ipc-500
Added IPC RequestWithContext & ControlWithContext
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/ipc.h2
-rw-r--r--src/core/hle/kernel/hle_ipc.cpp4
-rw-r--r--src/core/hle/service/service.cpp2
3 files changed, 7 insertions, 1 deletions
diff --git a/src/core/hle/ipc.h b/src/core/hle/ipc.h
index ef6595550..c9257de77 100644
--- a/src/core/hle/ipc.h
+++ b/src/core/hle/ipc.h
@@ -32,6 +32,8 @@ enum class CommandType : u32 {
32 Close = 2, 32 Close = 2,
33 Request = 4, 33 Request = 4,
34 Control = 5, 34 Control = 5,
35 RequestWithContext = 6,
36 ControlWithContext = 7,
35 Unspecified, 37 Unspecified,
36}; 38};
37 39
diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cpp
index 349bc11df..01904467e 100644
--- a/src/core/hle/kernel/hle_ipc.cpp
+++ b/src/core/hle/kernel/hle_ipc.cpp
@@ -110,7 +110,9 @@ void HLERequestContext::ParseCommandBuffer(u32_le* src_cmdbuf, bool incoming) {
110 // Padding to align to 16 bytes 110 // Padding to align to 16 bytes
111 rp.AlignWithPadding(); 111 rp.AlignWithPadding();
112 112
113 if (Session()->IsDomain() && (command_header->type == IPC::CommandType::Request || !incoming)) { 113 if (Session()->IsDomain() && ((command_header->type == IPC::CommandType::Request ||
114 command_header->type == IPC::CommandType::RequestWithContext) ||
115 !incoming)) {
114 // If this is an incoming message, only CommandType "Request" has a domain header 116 // If this is an incoming message, only CommandType "Request" has a domain header
115 // All outgoing domain messages have the domain header, if only incoming has it 117 // All outgoing domain messages have the domain header, if only incoming has it
116 if (incoming || domain_message_header) { 118 if (incoming || domain_message_header) {
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp
index dc30702c6..5b91089cf 100644
--- a/src/core/hle/service/service.cpp
+++ b/src/core/hle/service/service.cpp
@@ -144,10 +144,12 @@ ResultCode ServiceFrameworkBase::HandleSyncRequest(Kernel::HLERequestContext& co
144 rb.Push(RESULT_SUCCESS); 144 rb.Push(RESULT_SUCCESS);
145 return ResultCode(ErrorModule::HIPC, ErrorDescription::RemoteProcessDead); 145 return ResultCode(ErrorModule::HIPC, ErrorDescription::RemoteProcessDead);
146 } 146 }
147 case IPC::CommandType::ControlWithContext:
147 case IPC::CommandType::Control: { 148 case IPC::CommandType::Control: {
148 Core::System::GetInstance().ServiceManager().InvokeControlRequest(context); 149 Core::System::GetInstance().ServiceManager().InvokeControlRequest(context);
149 break; 150 break;
150 } 151 }
152 case IPC::CommandType::RequestWithContext:
151 case IPC::CommandType::Request: { 153 case IPC::CommandType::Request: {
152 InvokeRequest(context); 154 InvokeRequest(context);
153 break; 155 break;