ns_mitm: update to support new 19.0.0 command
This commit is contained in:
@@ -48,6 +48,29 @@ static Result _nsGetApplicationContentPath(Service *s, void* out, size_t out_siz
|
||||
);
|
||||
}
|
||||
|
||||
static Result _nsGetApplicationContentPath2(Service *s, void* out_path, size_t out_size, u64* out_program_id, u8 *out_attr, u64 app_id, NcmContentType content_type) {
|
||||
const struct {
|
||||
u8 content_type;
|
||||
u64 app_id;
|
||||
} in = { content_type, app_id };
|
||||
|
||||
struct {
|
||||
u8 attr;
|
||||
u64 program_id;
|
||||
} out;
|
||||
|
||||
Result rc = serviceDispatchInOut(s, 2524, in, out,
|
||||
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
|
||||
.buffers = { { out_path, out_size } },
|
||||
);
|
||||
if (R_SUCCEEDED(rc)) {
|
||||
*out_program_id = out.program_id;
|
||||
*out_attr = out.attr;
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
static Result _nsResolveApplicationContentPath(Service* s, u64 app_id, NcmContentType content_type) {
|
||||
const struct {
|
||||
u8 content_type;
|
||||
@@ -93,6 +116,10 @@ Result nswebGetRunningApplicationProgramId(NsDocumentInterface* doc, u64* out_pr
|
||||
return _nsGetRunningApplicationProgramId(&doc->s, out_program_id, app_id);
|
||||
}
|
||||
|
||||
Result nswebGetApplicationContentPath2(NsDocumentInterface* doc, void* out, size_t out_size, u64* out_program_id, u8 *out_attr, u64 app_id, NcmContentType content_type) {
|
||||
return _nsGetApplicationContentPath2(&doc->s, out, out_size, out_program_id, out_attr, app_id, content_type);
|
||||
}
|
||||
|
||||
void nsDocumentInterfaceClose(NsDocumentInterface* doc) {
|
||||
serviceClose(&doc->s);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user