libSceAppContent: Use last 16 characters of DLC folder to determine entitlement label (#3375)

* Use last 16 characters of DLC folder name to determine entitlement label

Code comments and commit name say it all.

* Clang

* Adjust comment

ftpdump appends -ac at the end of the entitlement label, so my comment was partially incorrect.
This commit is contained in:
Stephen Miller
2025-08-05 03:52:53 -05:00
committed by GitHub
parent afb9e220aa
commit 7ec3a38b89

View File

@@ -260,7 +260,12 @@ int PS4_SYSV_ABI sceAppContentInitialize(const OrbisAppContentInitParam* initPar
auto entitlement_label = entry.path().filename().string();
auto& info = addcont_info[addcont_count++];
info.status = OrbisAppContentAddcontDownloadStatus::Installed;
entitlement_label.copy(info.entitlement_label, sizeof(info.entitlement_label));
// Our recommended dumping method prepends the folder name with the game serial
// Since they end the folder name with the entitlement label, copy from the end instead.
entitlement_label.copy(info.entitlement_label, sizeof(info.entitlement_label),
entitlement_label.length() -
ORBIS_NP_UNIFIED_ENTITLEMENT_LABEL_SIZE + 1);
}
}