[Kernel] Set default license mask when available in XamContentCreateEx.

This commit is contained in:
gibbed 2018-11-20 14:24:13 -06:00
parent ff0b8a67cd
commit de34bd81db
1 changed files with 5 additions and 4 deletions

View File

@ -180,8 +180,6 @@ dword_result_t XamContentCreateEx(dword_t user_index, lpstring_t root_name,
lpdword_t license_mask_ptr, lpdword_t license_mask_ptr,
dword_t cache_size, qword_t content_size, dword_t cache_size, qword_t content_size,
lpvoid_t overlapped_ptr) { lpvoid_t overlapped_ptr) {
assert_null(license_mask_ptr);
X_RESULT result = X_ERROR_INVALID_PARAMETER; X_RESULT result = X_ERROR_INVALID_PARAMETER;
auto content_data = XCONTENT_DATA((uint8_t*)content_data_ptr); auto content_data = XCONTENT_DATA((uint8_t*)content_data_ptr);
@ -256,6 +254,10 @@ dword_result_t XamContentCreateEx(dword_t user_index, lpstring_t root_name,
result = content_manager->OpenContent(root_name.value(), content_data); result = content_manager->OpenContent(root_name.value(), content_data);
} }
if (license_mask_ptr && XSUCCEEDED(result)) {
*license_mask_ptr = 0;
}
if (overlapped_ptr) { if (overlapped_ptr) {
kernel_state()->CompleteOverlappedImmediateEx(overlapped_ptr, result, 0, kernel_state()->CompleteOverlappedImmediateEx(overlapped_ptr, result, 0,
disposition); disposition);
@ -421,8 +423,7 @@ dword_result_t XamContentDelete(dword_t user_index, lpvoid_t content_data_ptr,
DECLARE_XAM_EXPORT1(XamContentDelete, kContent, kImplemented); DECLARE_XAM_EXPORT1(XamContentDelete, kContent, kImplemented);
void RegisterContentExports(xe::cpu::ExportResolver* export_resolver, void RegisterContentExports(xe::cpu::ExportResolver* export_resolver,
KernelState* kernel_state) { KernelState* kernel_state) {}
}
} // namespace xam } // namespace xam
} // namespace kernel } // namespace kernel