From 271272e13be0c5bda088aefde62348fd86562345 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Thu, 19 Apr 2018 16:53:09 -0600 Subject: [PATCH] Stratosphere: Fix IPC rawdata out size, QueryPointerBufferSize works on hardware now. --- stratosphere/loader/source/ldr_debug_monitor.cpp | 2 +- stratosphere/loader/source/ldr_process_manager.cpp | 2 +- stratosphere/loader/source/servicesession.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/stratosphere/loader/source/ldr_debug_monitor.cpp b/stratosphere/loader/source/ldr_debug_monitor.cpp index c4f384120..fb9fb443b 100644 --- a/stratosphere/loader/source/ldr_debug_monitor.cpp +++ b/stratosphere/loader/source/ldr_debug_monitor.cpp @@ -45,7 +45,7 @@ Result DebugMonitorService::dispatch(IpcParsedCommand *r, IpcCommand *out_c, u32 rc = get_nso_info(((u64 *)in_rawdata)[0], r->Statics[0], r->StaticSizes[0], out_rawdata); if (R_SUCCEEDED(rc)) { - *out_raw_data_count = 4; + *out_raw_data_count = 1; } else { *out_raw_data_count = 0; } diff --git a/stratosphere/loader/source/ldr_process_manager.cpp b/stratosphere/loader/source/ldr_process_manager.cpp index 2c9103063..810bbb332 100644 --- a/stratosphere/loader/source/ldr_process_manager.cpp +++ b/stratosphere/loader/source/ldr_process_manager.cpp @@ -24,7 +24,7 @@ Result ProcessManagerService::dispatch(IpcParsedCommand *r, IpcCommand *out_c, u rc = register_title((Registration::TidSid *)in_rawdata, &out_index); if (R_SUCCEEDED(rc)) { ((u64 *)out_rawdata)[0] = out_index; - *out_raw_data_count = 8; + *out_raw_data_count = 2; } else { ((u64 *)out_rawdata)[0] = 0; *out_raw_data_count = 0; diff --git a/stratosphere/loader/source/servicesession.hpp b/stratosphere/loader/source/servicesession.hpp index 5cc3702bd..21d9cc4c5 100644 --- a/stratosphere/loader/source/servicesession.hpp +++ b/stratosphere/loader/source/servicesession.hpp @@ -138,7 +138,7 @@ class ServiceSession : public IWaitable { u64 retval; } *raw; - raw = (decltype(raw))ipcPrepareHeader(&c, out_words); + raw = (decltype(raw))ipcPrepareHeader(&c, out_words * 4); raw->magic = SFCO_MAGIC; raw->retval = retval;