XamContentGetCreator: Added check for existing content

This commit is contained in:
Gliniak 2021-01-04 20:13:10 +01:00
parent e2d3c07be0
commit ee7e65b1ce
1 changed files with 16 additions and 9 deletions

View File

@ -284,17 +284,24 @@ dword_result_t XamContentGetCreator(dword_t user_index,
auto content_data = XCONTENT_DATA((uint8_t*)content_data_ptr);
if (content_data.content_type == 1) {
// User always creates saves.
*is_creator_ptr = 1;
if (creator_xuid_ptr) {
*creator_xuid_ptr = kernel_state()->user_profile()->xuid();
bool content_exists =
kernel_state()->content_manager()->ContentExists(content_data);
if (content_exists) {
if (content_data.content_type == 1) {
// User always creates saves.
*is_creator_ptr = 1;
if (creator_xuid_ptr) {
*creator_xuid_ptr = kernel_state()->user_profile()->xuid();
}
} else {
*is_creator_ptr = 0;
if (creator_xuid_ptr) {
*creator_xuid_ptr = 0;
}
}
} else {
*is_creator_ptr = 0;
if (creator_xuid_ptr) {
*creator_xuid_ptr = 0;
}
result = X_ERROR_PATH_NOT_FOUND;
}
if (overlapped_ptr) {