VERY experimental Nintendo Switch 2 emulator
C++
Added RequestWithContext & ControlWithContext
David Marcec75bd5bf8be3f
diff --git a/src/core/hle/ipc.h b/src/core/hle/ipc.hindex ef65955506..c9257de776 100644--- a/src/core/hle/ipc.h+++ b/src/core/hle/ipc.h@@ -32,6 +32,8 @@ enum class CommandType : u32 {Close = 2,Request = 4,Control = 5,+ RequestWithContext = 6,+ ControlWithContext = 7,Unspecified,};diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cppindex 349bc11df2..01904467ea 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) {// Padding to align to 16 bytesrp.AlignWithPadding();- if (Session()->IsDomain() && (command_header->type == IPC::CommandType::Request || !incoming)) {+ if (Session()->IsDomain() && ((command_header->type == IPC::CommandType::Request ||+ command_header->type == IPC::CommandType::RequestWithContext) ||+ !incoming)) {// If this is an incoming message, only CommandType "Request" has a domain header// All outgoing domain messages have the domain header, if only incoming has itif (incoming || domain_message_header) {diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cppindex dc30702c66..5b91089cfd 100644--- a/src/core/hle/service/service.cpp+++ b/src/core/hle/service/service.cpp@@ -144,10 +144,12 @@ ResultCode ServiceFrameworkBase::HandleSyncRequest(Kernel::HLERequestContext& corb.Push(RESULT_SUCCESS);return ResultCode(ErrorModule::HIPC, ErrorDescription::RemoteProcessDead);}+ case IPC::CommandType::ControlWithContext:case IPC::CommandType::Control: {Core::System::GetInstance().ServiceManager().InvokeControlRequest(context);break;}+ case IPC::CommandType::RequestWithContext:case IPC::CommandType::Request: {InvokeRequest(context);break;