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.
This commit is contained in:
Zephyron 2025-01-15 19:38:09 +10:00
parent 132077e18f
commit 498d016873

View file

@ -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