mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
Merge pull request #12951 from liamwhite/more-ipc
ipc: additional fixes
This commit is contained in:
commit
52c8adc7ed
3 changed files with 16 additions and 4 deletions
|
@ -280,7 +280,7 @@ void ReadInArgument(bool is_domain, CallArguments& args, const u8* raw_data, HLE
|
||||||
|
|
||||||
u32 value{};
|
u32 value{};
|
||||||
std::memcpy(&value, raw_data + ArgOffset, ArgSize);
|
std::memcpy(&value, raw_data + ArgOffset, ArgSize);
|
||||||
std::get<ArgIndex>(args) = ctx.GetDomainHandler<ArgType::Type>(value - 1);
|
std::get<ArgIndex>(args) = ctx.GetDomainHandler<typename ArgType::element_type>(value - 1);
|
||||||
|
|
||||||
return ReadInArgument<MethodArguments, CallArguments, ArgAlign, ArgEnd, HandleIndex, InBufferIndex, OutBufferIndex, true, ArgIndex + 1>(is_domain, args, raw_data, ctx, temp);
|
return ReadInArgument<MethodArguments, CallArguments, ArgAlign, ArgEnd, HandleIndex, InBufferIndex, OutBufferIndex, true, ArgIndex + 1>(is_domain, args, raw_data, ctx, temp);
|
||||||
} else if constexpr (ArgumentTraits<ArgType>::Type == ArgumentType::InCopyHandle) {
|
} else if constexpr (ArgumentTraits<ArgType>::Type == ArgumentType::InCopyHandle) {
|
||||||
|
|
|
@ -65,6 +65,14 @@ struct ClientProcessId {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ProcessId {
|
struct ProcessId {
|
||||||
|
explicit ProcessId() : pid() {}
|
||||||
|
explicit ProcessId(u64 p) : pid(p) {}
|
||||||
|
/* implicit */ ProcessId(const ClientProcessId& c) : pid(c.pid) {}
|
||||||
|
|
||||||
|
bool operator==(const ProcessId& rhs) const {
|
||||||
|
return pid == rhs.pid;
|
||||||
|
}
|
||||||
|
|
||||||
explicit operator bool() const {
|
explicit operator bool() const {
|
||||||
return pid != 0;
|
return pid != 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -299,8 +299,12 @@ Result HLERequestContext::WriteToOutgoingCommandBuffer() {
|
||||||
if (GetManager()->IsDomain()) {
|
if (GetManager()->IsDomain()) {
|
||||||
current_offset = domain_offset - static_cast<u32>(outgoing_domain_objects.size());
|
current_offset = domain_offset - static_cast<u32>(outgoing_domain_objects.size());
|
||||||
for (auto& object : outgoing_domain_objects) {
|
for (auto& object : outgoing_domain_objects) {
|
||||||
GetManager()->AppendDomainHandler(std::move(object));
|
if (object) {
|
||||||
cmd_buf[current_offset++] = static_cast<u32_le>(GetManager()->DomainHandlerCount());
|
GetManager()->AppendDomainHandler(std::move(object));
|
||||||
|
cmd_buf[current_offset++] = static_cast<u32_le>(GetManager()->DomainHandlerCount());
|
||||||
|
} else {
|
||||||
|
cmd_buf[current_offset++] = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue