diff options
| author | 2018-02-20 21:59:58 +0300 | |
|---|---|---|
| committer | 2018-02-20 21:59:58 +0300 | |
| commit | 827152d1fd72d13b47b331f64455fc2a641877b1 (patch) | |
| tree | 7233f6661549d2c0d1de8c037c7124f47b3f57b4 /src | |
| parent | IPC: add domain header to response if only it exists in request (diff) | |
| download | yuzu-827152d1fd72d13b47b331f64455fc2a641877b1.tar.gz yuzu-827152d1fd72d13b47b331f64455fc2a641877b1.tar.xz yuzu-827152d1fd72d13b47b331f64455fc2a641877b1.zip | |
Fix: change check for domain order and existance of domain message header
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/ipc_helpers.h | 3 | ||||
| -rw-r--r-- | src/core/hle/kernel/hle_ipc.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/kernel/server_session.cpp | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/src/core/hle/ipc_helpers.h b/src/core/hle/ipc_helpers.h index 97290fec5..3f87c4297 100644 --- a/src/core/hle/ipc_helpers.h +++ b/src/core/hle/ipc_helpers.h | |||
| @@ -118,7 +118,8 @@ public: | |||
| 118 | 118 | ||
| 119 | AlignWithPadding(); | 119 | AlignWithPadding(); |
| 120 | 120 | ||
| 121 | if (context.Session()->IsDomain() && context.GetDomainMessageHeader()) { | 121 | const bool request_has_domain_header{context.GetDomainMessageHeader() != nullptr}; |
| 122 | if (context.Session()->IsDomain() && request_has_domain_header) { | ||
| 122 | IPC::DomainMessageHeader domain_header{}; | 123 | IPC::DomainMessageHeader domain_header{}; |
| 123 | domain_header.num_objects = num_domain_objects; | 124 | domain_header.num_objects = num_domain_objects; |
| 124 | PushRaw(domain_header); | 125 | PushRaw(domain_header); |
diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cpp index 3b1f3154d..eef784f5e 100644 --- a/src/core/hle/kernel/hle_ipc.cpp +++ b/src/core/hle/kernel/hle_ipc.cpp | |||
| @@ -198,7 +198,7 @@ ResultCode HLERequestContext::WriteToOutgoingCommandBuffer(u32_le* dst_cmdbuf, P | |||
| 198 | 198 | ||
| 199 | // TODO(Subv): Translate the X/A/B/W buffers. | 199 | // TODO(Subv): Translate the X/A/B/W buffers. |
| 200 | 200 | ||
| 201 | if (domain_message_header && Session()->IsDomain()) { | 201 | if (Session()->IsDomain() && domain_message_header) { |
| 202 | ASSERT(domain_message_header->num_objects == domain_objects.size()); | 202 | ASSERT(domain_message_header->num_objects == domain_objects.size()); |
| 203 | // Write the domain objects to the command buffer, these go after the raw untranslated data. | 203 | // Write the domain objects to the command buffer, these go after the raw untranslated data. |
| 204 | // TODO(Subv): This completely ignores C buffers. | 204 | // TODO(Subv): This completely ignores C buffers. |
diff --git a/src/core/hle/kernel/server_session.cpp b/src/core/hle/kernel/server_session.cpp index 42c2f760b..5f31cf19b 100644 --- a/src/core/hle/kernel/server_session.cpp +++ b/src/core/hle/kernel/server_session.cpp | |||
| @@ -96,7 +96,7 @@ ResultCode ServerSession::HandleSyncRequest(SharedPtr<Thread> thread) { | |||
| 96 | 96 | ||
| 97 | ResultCode result = RESULT_SUCCESS; | 97 | ResultCode result = RESULT_SUCCESS; |
| 98 | // If the session has been converted to a domain, handle the domain request | 98 | // If the session has been converted to a domain, handle the domain request |
| 99 | if (context.GetDomainMessageHeader() && IsDomain()) { | 99 | if (IsDomain() && context.GetDomainMessageHeader()) { |
| 100 | result = HandleDomainSyncRequest(context); | 100 | result = HandleDomainSyncRequest(context); |
| 101 | // If there is no domain header, the regular session handler is used | 101 | // If there is no domain header, the regular session handler is used |
| 102 | } else if (hle_handler != nullptr) { | 102 | } else if (hle_handler != nullptr) { |