docs(libScePad): record the scePadRead queue gap in technical debt

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
TideOPL 2026-10-07 10:15:39 +01:00
parent e2b527bb09
commit cefb5a9fc0
2 changed files with 5 additions and 5 deletions

View File

@ -142,11 +142,10 @@ int APS5_VABI scePadOpen_nid_postfix(int userId, int type, int index, const void
int APS5_VABI scePadReadState(int handle, PadData* data);
int APS5_VABI scePadRead_nid_postfix(int handle, PadData* data, int num) {
// The title drains the queued states; one current state is reported per call.
if (data == nullptr || num <= 0) APS5_INVALID_ARG_EX;
const int result = scePadReadState(handle, data);
if (result != 0) return result;
return 1;
if (data == nullptr || num <= 0) APS5_INVALID_ARG_EX;
const int result = scePadReadState(handle, data);
if (result != 0) return result;
return 1;
}
int APS5_VABI scePadReadState(int handle, PadData* data) {

View File

@ -233,3 +233,4 @@ Throughout the project, every function at every stage either **does exactly what
- [sceFontOpenFontSet](../../core/libs/prx/libSceFont/src/SystemFont.cpp) (libSceFont) opens only the primary file of a system font set. Characters the console takes from the set's other files (Hangul, Thai and Arabic in Japanese and Chinese sets, Arabic in European sets) are reported as unsupported glyphs. The console file names are those of the PS4 firmware; the names of the PS5-only JG2 sets (`0x1A......`) are unknown, so they use the SSTJpPro files. When a console file is missing, an openly licensed substitute (Noto Sans, Noto Sans Mono, Noto Sans Thai, Noto Sans CJK) is loaded instead. It is not the system font: its metrics differ, so text width, line height and wrapping differ from the console. System font faces are loaded by FreeType in host memory, not in the font memory the title passes to the library: FreeType needs about 1 MiB per CJK face, which the title's font memory is not sized for.
- [Font writing lines](../../core/libs/prx/libSceFont/src/WritingLine.cpp) (libSceFont) - `sceFontCreateWritingLine`, `sceFontWritingLineWritesOrder`, `sceFontWritingLineRefersRenderStep`, `sceFontWritingLineGetRenderMetrics` and `sceFontWritingLineClear` follow [KytyPS5](https://github.com/KytyPS5/KytyPS5/blob/main/src/libs/libFont.cpp): runs are placed left to right, each at the line's advance so far, with no spacing or adjustment. Only horizontal and left-to-right lines, writing attribute 0 and non-null run metrics are modelled; other values, the metrics of an empty line and unknown or null handles throw, since no reference gives their result or error code. `sceFontWritingLineGetOrderingSpace` still throws (KytyPS5's values are placeholders). Lines are allocated on the host, not in the font memory
- [sceImeKeyboardGetResourceId](../../core/libs/prx/libSceIme/Export.cpp) (libSceIme) reports that no USB keyboard is connected (`0x80bc0004`, as [shadPS4](https://github.com/shadps4-emu/shadPS4) does) because IME keyboard events are not delivered to the handler, although [libSceKeyboard](../../core/libs/prx/libSceKeyboard/src/keyboard_impl.cpp) exposes the host keyboard
- [scePadRead](../../core/libs/prx/libScePad/Export.cpp) (libScePad) keeps no queue of past states: each call writes the current state to the first entry and returns 1 whatever `num` is, so input that changes and changes back between two calls is not reported