summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZephyron <zephyron@citron-emu.org>2025-01-15 19:38:09 +1000
committerMike Lothian <mike@fireburn.co.uk>2025-05-11 12:17:03 +0100
commit75c7b8a672994a8ebc4faaec714e0a07caf2fd5e (patch)
treefc7ce0c08e7ec63ab573f218fc91c3aa2fe65157
parentb3ff92116e3073d3184dad1f0bfd24387c866f28 (diff)
fix(sm_controller): Correct QueryPointerBufferSize implementation
- Updated the QueryPointerBufferSize function to return the correct u16 pointer buffer size. - Ensured the function logs its call at the debug level. - Used IPC::ResponseBuilder to construct the response with the correct buffer size. This change addresses the stubbed implementation and ensures compliance with the HIPC protocol.
-rw-r--r--src/core/hle/service/sm/sm_controller.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hle/service/sm/sm_controller.cpp b/src/core/hle/service/sm/sm_controller.cpp
index 7f0fb91d0..60e1980b2 100644
--- a/src/core/hle/service/sm/sm_controller.cpp
+++ b/src/core/hle/service/sm/sm_controller.cpp
@@ -68,11 +68,13 @@ void Controller::CloneCurrentObjectEx(HLERequestContext& ctx) {
}
void Controller::QueryPointerBufferSize(HLERequestContext& ctx) {
- LOG_WARNING(Service, "(STUBBED) called");
+ LOG_DEBUG(Service, "called");
+
+ u16 pointer_buffer_size = 0x8000; // Replace with the actual size if known
IPC::ResponseBuilder rb{ctx, 3};
rb.Push(ResultSuccess);
- rb.Push<u16>(0x8000);
+ rb.Push<u16>(pointer_buffer_size);
}
// https://switchbrew.org/wiki/IPC_Marshalling