From 121b472393136de7847a9aeeabec06b5a4e88108 Mon Sep 17 00:00:00 2001 From: cheezwiz7899 Date: Wed, 1 Jul 2026 09:37:37 +1000 Subject: [PATCH] fix(aoc): apply GetBaseTitleID to PrepareAddOnContent program ID GetApplicationProcessProgramID() can return the +0x800 update title ID rather than the base ID, causing GetAOCBaseTitleID and GetAOCTitleIDsForBase to produce wrong results. Apply GetBaseTitleID() first, matching CountAddOnContent and ListAddOnContent. Demote log to DEBUG; add raw_program_id, accumulated/matched counts for diagnostics. --- src/core/hle/service/aoc/addon_content_manager.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/core/hle/service/aoc/addon_content_manager.cpp b/src/core/hle/service/aoc/addon_content_manager.cpp index 89c1390bfe..41fd45711a 100644 --- a/src/core/hle/service/aoc/addon_content_manager.cpp +++ b/src/core/hle/service/aoc/addon_content_manager.cpp @@ -252,7 +252,8 @@ Result IAddOnContentManager::GetAddOnContentBaseId(Out out_title_id, } Result IAddOnContentManager::PrepareAddOnContent(s32 addon_index, ClientProcessId process_id) { - const auto program_id = system.GetApplicationProcessProgramID(); + const auto raw_program_id = system.GetApplicationProcessProgramID(); + const auto program_id = FileSys::GetBaseTitleID(raw_program_id); const auto aoc_base_id = FileSys::GetAOCBaseTitleID(program_id); const auto matching_aocs = GetAOCTitleIDsForBase(add_on_content, program_id); u64 physical_title_id = 0; @@ -260,11 +261,12 @@ Result IAddOnContentManager::PrepareAddOnContent(s32 addon_index, ClientProcessI physical_title_id = matching_aocs[static_cast(addon_index) - 1]; } - LOG_WARNING(Service_AOC, - "PrepareAddOnContent: program_id={:016X}, aoc_base={:016X}, " - "addon_index={}, physical_title_id={:016X}, process_id={}", - program_id, aoc_base_id, addon_index, physical_title_id, - process_id.pid); + LOG_DEBUG(Service_AOC, + "PrepareAddOnContent: raw_program_id={:016X}, base_id={:016X}, " + "aoc_base={:016X}, accumulated={}, matched={}, addon_index={}, " + "physical_title_id={:016X}, process_id={}", + raw_program_id, program_id, aoc_base_id, add_on_content.size(), + matching_aocs.size(), addon_index, physical_title_id, process_id.pid); R_SUCCEED(); }