2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

IPC: Take the number of domain objects as a parameter in MakeBuilder.

This commit is contained in:
Subv 2018-01-07 09:59:38 -05:00 committed by bunnei
parent 5f41477f9c
commit ba2ffd7b81
2 changed files with 6 additions and 4 deletions

View file

@ -205,12 +205,14 @@ public:
} }
RequestBuilder MakeBuilder(u32 normal_params_size, u32 num_handles_to_copy, RequestBuilder MakeBuilder(u32 normal_params_size, u32 num_handles_to_copy,
u32 num_handles_to_move, bool validate_header = true) { u32 num_handles_to_move, u32 num_domain_objects,
bool validate_header = true) {
if (validate_header) { if (validate_header) {
ValidateHeader(); ValidateHeader();
} }
return {*context, normal_params_size, num_handles_to_copy, num_handles_to_move}; return {*context, normal_params_size, num_handles_to_copy, num_handles_to_move,
num_domain_objects};
} }
template <typename T> template <typename T>

View file

@ -99,7 +99,7 @@ void SM::GetService(Kernel::HLERequestContext& ctx) {
auto client_port = service_manager->GetServicePort(name); auto client_port = service_manager->GetServicePort(name);
if (client_port.Failed()) { if (client_port.Failed()) {
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0, 0); IPC::RequestBuilder rb = rp.MakeBuilder(2, 0, 0, 0);
rb.Push(client_port.Code()); rb.Push(client_port.Code());
LOG_ERROR(Service_SM, "called service=%s -> error 0x%08X", name.c_str(), LOG_ERROR(Service_SM, "called service=%s -> error 0x%08X", name.c_str(),
client_port.Code().raw); client_port.Code().raw);
@ -111,7 +111,7 @@ void SM::GetService(Kernel::HLERequestContext& ctx) {
if (session.Succeeded()) { if (session.Succeeded()) {
LOG_DEBUG(Service_SM, "called service=%s -> session=%u", name.c_str(), LOG_DEBUG(Service_SM, "called service=%s -> session=%u", name.c_str(),
(*session)->GetObjectId()); (*session)->GetObjectId());
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0, 1); IPC::RequestBuilder rb = rp.MakeBuilder(2, 0, 1, 0);
rb.Push(session.Code()); rb.Push(session.Code());
rb.PushMoveObjects(std::move(session).Unwrap()); rb.PushMoveObjects(std::move(session).Unwrap());
} }