mirror of
				https://git.zaroz.cloud/nintendo-back-up/yuzu/yuzu-mainline.git
				synced 2025-03-21 01:53:15 +00:00 
			
		
		
		
	Added RequestWithContext & ControlWithContext
This commit is contained in:
		
							parent
							
								
									1b5c02fc37
								
							
						
					
					
						commit
						fd86cdb2e2
					
				@ -32,6 +32,8 @@ enum class CommandType : u32 {
 | 
				
			|||||||
    Close = 2,
 | 
					    Close = 2,
 | 
				
			||||||
    Request = 4,
 | 
					    Request = 4,
 | 
				
			||||||
    Control = 5,
 | 
					    Control = 5,
 | 
				
			||||||
 | 
					    RequestWithContext = 6,
 | 
				
			||||||
 | 
					    ControlWithContext = 7,
 | 
				
			||||||
    Unspecified,
 | 
					    Unspecified,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -110,7 +110,9 @@ void HLERequestContext::ParseCommandBuffer(u32_le* src_cmdbuf, bool incoming) {
 | 
				
			|||||||
    // Padding to align to 16 bytes
 | 
					    // Padding to align to 16 bytes
 | 
				
			||||||
    rp.AlignWithPadding();
 | 
					    rp.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
 | 
					        // 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 it
 | 
					        // All outgoing domain messages have the domain header, if only incoming has it
 | 
				
			||||||
        if (incoming || domain_message_header) {
 | 
					        if (incoming || domain_message_header) {
 | 
				
			||||||
 | 
				
			|||||||
@ -144,10 +144,12 @@ ResultCode ServiceFrameworkBase::HandleSyncRequest(Kernel::HLERequestContext& co
 | 
				
			|||||||
        rb.Push(RESULT_SUCCESS);
 | 
					        rb.Push(RESULT_SUCCESS);
 | 
				
			||||||
        return ResultCode(ErrorModule::HIPC, ErrorDescription::RemoteProcessDead);
 | 
					        return ResultCode(ErrorModule::HIPC, ErrorDescription::RemoteProcessDead);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    case IPC::CommandType::ControlWithContext:
 | 
				
			||||||
    case IPC::CommandType::Control: {
 | 
					    case IPC::CommandType::Control: {
 | 
				
			||||||
        Core::System::GetInstance().ServiceManager().InvokeControlRequest(context);
 | 
					        Core::System::GetInstance().ServiceManager().InvokeControlRequest(context);
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    case IPC::CommandType::RequestWithContext:
 | 
				
			||||||
    case IPC::CommandType::Request: {
 | 
					    case IPC::CommandType::Request: {
 | 
				
			||||||
        InvokeRequest(context);
 | 
					        InvokeRequest(context);
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user