mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 21:52:48 +00:00
Fix titledb entry manual detection
This commit is contained in:
parent
829880994f
commit
521fb25075
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
u32 BuildTitleInfoEntryTmd(TitleInfoEntry* tie, TitleMetaData* tmd, bool sd) {
|
u32 BuildTitleInfoEntryTmd(TitleInfoEntry* tie, TitleMetaData* tmd, bool sd) {
|
||||||
u64 title_id = getbe64(tmd->title_id);
|
u64 title_id = getbe64(tmd->title_id);
|
||||||
u32 has_id1 = false;
|
u32 has_idx1 = false;
|
||||||
|
|
||||||
// set basic values
|
// set basic values
|
||||||
memset(tie, 0x00, sizeof(TitleInfoEntry));
|
memset(tie, 0x00, sizeof(TitleInfoEntry));
|
||||||
@ -25,14 +25,14 @@ u32 BuildTitleInfoEntryTmd(TitleInfoEntry* tie, TitleMetaData* tmd, bool sd) {
|
|||||||
tie->title_size =
|
tie->title_size =
|
||||||
(align_size * 3) + // base folder + 'content' + 'cmd'
|
(align_size * 3) + // base folder + 'content' + 'cmd'
|
||||||
align(TMD_SIZE_N(content_count), align_size) + // TMD
|
align(TMD_SIZE_N(content_count), align_size) + // TMD
|
||||||
align_size; // CMD, placeholder
|
align_size; // CMD, placeholder (!!!)
|
||||||
for (u32 i = 0; (i < content_count) && (i < TMD_MAX_CONTENTS); i++, chunk++) {
|
for (u32 i = 0; (i < content_count) && (i < TMD_MAX_CONTENTS); i++, chunk++) {
|
||||||
if (getbe32(chunk->id) == 1) has_id1 = true; // will be useful later
|
if (getbe16(chunk->index) == 1) has_idx1 = true; // will be useful later
|
||||||
tie->title_size += align(getbe64(chunk->size), align_size);
|
tie->title_size += align(getbe64(chunk->size), align_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
// manual? (we need to properly check this later)
|
// manual? (we need to properly check this later)
|
||||||
if (has_id1 && (((title_id >> 32) == 0x00040000) || ((title_id >> 32) == 0x00040010))) {
|
if (has_idx1 && (((title_id >> 32) == 0x00040000) || ((title_id >> 32) == 0x00040010))) {
|
||||||
tie->flags_0[0] = 0x1; // this may have a manual
|
tie->flags_0[0] = 0x1; // this may have a manual
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -379,7 +379,6 @@ u32 CheckFixCmdCmac(const char* path, bool fix, bool check_perms) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// we abuse the unknown u32 to mark custom, unfinished CMDs
|
// we abuse the unknown u32 to mark custom, unfinished CMDs
|
||||||
bool fix_missing = false;
|
bool fix_missing = false;
|
||||||
if (cmd->unknown == 0xFFFFFFFE) {
|
if (cmd->unknown == 0xFFFFFFFE) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user