AppMetadata throws length_error for a title or title ID that does not fit its
buffer, which the title ID lookup did not catch, so a homebrew title with a long
ID made sceConvertKeycodeGetImeKeyboardType throw instead of using the PS5
fallback. Catch it with the other metadata failures and cover oversized,
malformed and missing metadata at the export. sceUserServiceGetKeyboardType also
gets a test that a malformed ANYPS5_LANGUAGE is rejected with the output left
untouched, and the debt entries say so.
sceUserServiceGetKeyboardType now returns the keyboard type of the configured
system language from the repository owner's table (languages 0 to 29), with 20
(US English) for a language outside it. The input variants stay 0, the only
value the table gives for Japanese and Traditional Chinese.
sceConvertKeycodeGetImeKeyboardType takes the PS4 client rule from the title ID
prefix (CUSA is PS4); a missing or custom ID is treated as PS5. Tests walk the
owner's table through both calls and the title ID cases; both debt entries
updated.
Initialize, Terminate, UpdateStatus, GetStatus, Open, OpenA, Close and
GetResult run the common-dialog state machine. There is no PSN profile
UI, so Open and OpenA finish at once and GetResult reports result 0,
userAction USER_CANCELED and the caller's userData, as shadPS4 does when
its window is dismissed.
Paths where shadPS4 and the other common dialogs here return different
errors throw, and so does a param whose size or mode does not match the
shadPS4 layout. The common-dialog codes the library uses are added to
libSceCommonDialog/CommonDialog.hpp.
Every import lookup walked the lease out from the containing range to find
the run of continuing registry ranges, which is linear in the run length.
That walk depends only on the lease snapshot, the containing range and the
import window block, so its first and last index are now memoized per
thread under a weak reference to the snapshot, the range index, the window
and the window's low end. APS5_NO_RUN_MEMO walks every time.
Everything that depends on other state runs on each call as before: the
largest size, the budget, the failed blocks, the remembered refusals and
the halving block search. importRunBounds returns the chosen indices, so
sameRange, runCovers and the whole-run lookup in importAllocation compare
against the lease without copying the run's range pointers.
importRunFailureShrinkTests records a failed 8 MiB block between two
lookups on an unchanged registry and requires the run to shrink to its
4 MiB blocks. importRunGrowthTests and importRunReplacedTests check that a
run grows and shrinks when its ranges are registered or replaced.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Delegate sceNpCommerceDialogInitializeInternal to sceNpCommerceDialogInitialize, sharing dialog state and returning COMMON_DIALOG_ERROR_ALREADY_INITIALIZED on duplicate initialization, following shadPS4. Add regression tests in GuestNpCommerceDialog covering initial, duplicate, and post-termination initialization, and update technical debt documentation.
Read the clock of a libkernel condition attribute, returning
SCE_KERNEL_ERROR_EINVAL for a null or destroyed attribute as
scePthreadCondattrSetclock does, after FreeBSD 11.4 libthr's
_pthread_condattr_getclock. A null clock pointer throws.
The initial user reported keyboard type 0, which the converter maps to IME type 0
and then rejects, so a title reading the layout still could not use it. Report 20
for sceUserServiceGetKeyboardType, which the owner's table maps to IME keyboard
type 4 (English, US); the Japanese and Traditional Chinese input variants stay 0.
Tests and both debt entries updated.