From e6626a7825e7e5eabcbcd13c5046e238e3021859 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Wed, 11 Oct 2023 12:35:22 -0700 Subject: [PATCH] fsldr: update OpenCodeFileSystem for 17.0.0 --- nx/source/services/fsldr.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/nx/source/services/fsldr.c b/nx/source/services/fsldr.c index 0d7046b8..08ea01cd 100644 --- a/nx/source/services/fsldr.c +++ b/nx/source/services/fsldr.c @@ -38,7 +38,26 @@ Result fsldrOpenCodeFileSystem(FsCodeInfo* out_code_info, u64 tid, const char *p char send_path[FS_MAX_PATH]={0}; strncpy(send_path, path, FS_MAX_PATH-1); - if (hosversionAtLeast(16,0,0)) { + if (hosversionAtLeast(17,0,0)) { + const struct { + u8 attr; + u64 tid; + } in = { attr, tid }; + + serviceAssumeDomain(&g_fsldrSrv); + return serviceDispatchIn(&g_fsldrSrv, 0, in, + .buffer_attrs = { + SfBufferAttr_FixedSize | SfBufferAttr_HipcPointer | SfBufferAttr_In, + SfBufferAttr_HipcMapAlias | SfBufferAttr_Out, + }, + .buffers = { + { send_path, FS_MAX_PATH }, + { out_code_info, sizeof(*out_code_info) }, + }, + .out_num_objects = 1, + .out_objects = &out->s, + ); + } else if (hosversionAtLeast(16,0,0)) { const struct { u8 attr; u64 tid;