Repository navigation
Conversation
sceNpTrophy2GetGameIcon, sceNpTrophy2GetGroupIcon and sceNpTrophy2GetTrophyIcon throw std::runtime_error when no icon is read. A throw escapes the C ABI and stops the title, while the sibling sceNpTrophy2GetRewardIcon zeroes the size and returns SCE_NP_TROPHY2_ERROR_ICON_FILE_NOT_FOUND, which the technical debt entry for libSceNpTrophy2 cites as the expected result of these calls. The three functions now zero the size and return the same error code.
The guest test checks that the three icon queries that have no icon file return SCE_NP_TROPHY2_ERROR_ICON_FILE_NOT_FOUND with a zero size, which the throwing versions did not satisfy.
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Change: Bug fix Merge Risk:
|
What
sceNpTrophy2GetGameIcon,sceNpTrophy2GetGroupIconandsceNpTrophy2GetTrophyIconthrew a C++ exception when no icon file existed. They now returnSCE_NP_TROPHY2_ERROR_ICON_FILE_NOT_FOUNDwith the size zeroed. That error is the not-found answer by design, matching the siblingsceNpTrophy2GetRewardIconand the debt entry that describes these functions. Its effect on a title is not measured here.Commits:
Tested
main.ctest -R '^guest_nptrophy2$': 1 of 1 passed (guest_nptrophy2).tools/check_conventions.py --base upstream/mainandgit diff --check upstream/main: clean.Not verified
TrophyStore.cppand its tests, not these icon files.Checklist
main; no other open PR changes these icon functionsSummary by CodeRabbit
Bug Fixes
Documentation