From 498d016873bc51147d098c501a8364d58c33eaca Mon Sep 17 00:00:00 2001 From: Zephyron Date: Wed, 15 Jan 2025 19:38:09 +1000 Subject: [PATCH] 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. --- src/core/hle/service/sm/sm_controller.cpp | 6 ++++-- 1 file 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(0x8000); + rb.Push(pointer_buffer_size); } // https://switchbrew.org/wiki/IPC_Marshalling