diff options
| author | 2018-02-16 20:55:26 -0500 | |
|---|---|---|
| committer | 2018-02-16 20:55:26 -0500 | |
| commit | 3388208597d261b7955b013cf7fef67e3d03ddc6 (patch) | |
| tree | 61cd05e46117627a6dd66daae4a367340e7d8572 /src/core/hle/kernel | |
| parent | Merge pull request #195 from bunnei/shared-font (diff) | |
| parent | Service/hid: stub some functions (diff) | |
| download | yuzu-3388208597d261b7955b013cf7fef67e3d03ddc6.tar.gz yuzu-3388208597d261b7955b013cf7fef67e3d03ddc6.tar.xz yuzu-3388208597d261b7955b013cf7fef67e3d03ddc6.zip | |
Merge pull request #197 from mailwl/hid
Service/hid: stub some functions
Diffstat (limited to 'src/core/hle/kernel')
| -rw-r--r-- | src/core/hle/kernel/hle_ipc.cpp | 51 | ||||
| -rw-r--r-- | src/core/hle/kernel/hle_ipc.h | 2 |
2 files changed, 53 insertions, 0 deletions
diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cpp index 6d16f71a7..25ba26f18 100644 --- a/src/core/hle/kernel/hle_ipc.cpp +++ b/src/core/hle/kernel/hle_ipc.cpp | |||
| @@ -254,4 +254,55 @@ size_t HLERequestContext::GetWriteBufferSize() const { | |||
| 254 | return is_buffer_b ? BufferDescriptorB()[0].Size() : BufferDescriptorC()[0].Size(); | 254 | return is_buffer_b ? BufferDescriptorB()[0].Size() : BufferDescriptorC()[0].Size(); |
| 255 | } | 255 | } |
| 256 | 256 | ||
| 257 | std::string HLERequestContext::Description() const { | ||
| 258 | if (!command_header) { | ||
| 259 | return "No command header available"; | ||
| 260 | } | ||
| 261 | std::ostringstream s; | ||
| 262 | s << "IPC::CommandHeader: Type:" << static_cast<u32>(command_header->type.Value()); | ||
| 263 | s << ", X(Pointer):" << command_header->num_buf_x_descriptors; | ||
| 264 | if (command_header->num_buf_x_descriptors) { | ||
| 265 | s << '['; | ||
| 266 | for (u64 i = 0; i < command_header->num_buf_x_descriptors; ++i) { | ||
| 267 | s << "0x" << std::hex << BufferDescriptorX()[i].Size(); | ||
| 268 | if (i < command_header->num_buf_x_descriptors - 1) | ||
| 269 | s << ", "; | ||
| 270 | } | ||
| 271 | s << ']'; | ||
| 272 | } | ||
| 273 | s << ", A(Send):" << command_header->num_buf_a_descriptors; | ||
| 274 | if (command_header->num_buf_a_descriptors) { | ||
| 275 | s << '['; | ||
| 276 | for (u64 i = 0; i < command_header->num_buf_a_descriptors; ++i) { | ||
| 277 | s << "0x" << std::hex << BufferDescriptorA()[i].Size(); | ||
| 278 | if (i < command_header->num_buf_a_descriptors - 1) | ||
| 279 | s << ", "; | ||
| 280 | } | ||
| 281 | s << ']'; | ||
| 282 | } | ||
| 283 | s << ", B(Receive):" << command_header->num_buf_b_descriptors; | ||
| 284 | if (command_header->num_buf_b_descriptors) { | ||
| 285 | s << '['; | ||
| 286 | for (u64 i = 0; i < command_header->num_buf_b_descriptors; ++i) { | ||
| 287 | s << "0x" << std::hex << BufferDescriptorB()[i].Size(); | ||
| 288 | if (i < command_header->num_buf_b_descriptors - 1) | ||
| 289 | s << ", "; | ||
| 290 | } | ||
| 291 | s << ']'; | ||
| 292 | } | ||
| 293 | s << ", C(ReceiveList):" << BufferDescriptorC().size(); | ||
| 294 | if (!BufferDescriptorC().empty()) { | ||
| 295 | s << '['; | ||
| 296 | for (u64 i = 0; i < BufferDescriptorC().size(); ++i) { | ||
| 297 | s << "0x" << std::hex << BufferDescriptorC()[i].Size(); | ||
| 298 | if (i < BufferDescriptorC().size() - 1) | ||
| 299 | s << ", "; | ||
| 300 | } | ||
| 301 | s << ']'; | ||
| 302 | } | ||
| 303 | s << ", data_size:" << command_header->data_size.Value(); | ||
| 304 | |||
| 305 | return s.str(); | ||
| 306 | } | ||
| 307 | |||
| 257 | } // namespace Kernel | 308 | } // namespace Kernel |
diff --git a/src/core/hle/kernel/hle_ipc.h b/src/core/hle/kernel/hle_ipc.h index 81e3489c8..b5631b773 100644 --- a/src/core/hle/kernel/hle_ipc.h +++ b/src/core/hle/kernel/hle_ipc.h | |||
| @@ -202,6 +202,8 @@ public: | |||
| 202 | return domain_objects.size(); | 202 | return domain_objects.size(); |
| 203 | } | 203 | } |
| 204 | 204 | ||
| 205 | std::string Description() const; | ||
| 206 | |||
| 205 | private: | 207 | private: |
| 206 | std::array<u32, IPC::COMMAND_BUFFER_LENGTH> cmd_buf; | 208 | std::array<u32, IPC::COMMAND_BUFFER_LENGTH> cmd_buf; |
| 207 | SharedPtr<Kernel::ServerSession> server_session; | 209 | SharedPtr<Kernel::ServerSession> server_session; |