Files
AnyPS5/docs/dev/debt/libSceSystemGesture.md
T
bl4nkTHEBUNKER 15af4e3fa7 feat(libSceSystemGesture): report primitive touch events from the pad reports
sceSystemGestureUpdatePrimitiveTouchRecognizer reads the pad reports the title
passes in and tracks every touch as a primitive, so the primitive event queries
report begin, active and end events with their pressed and current positions,
delta vector, delta time and elapsed time instead of reporting that no touch
input exists. sceSystemGestureGetPrimitiveTouchEventByPrimitiveID no longer
throws for a tracked touch.
2026-10-18 17:08:43 +02:00

2.9 KiB

libSceSystemGesture technical debt

Silent stubs

  • System gesture recognizers (libSceSystemGesture) - sceSystemGestureGetTouchEvents, GetTouchEventsCount, GetTouchEventByIndex and the recognizer append, remove, reset and update calls report that no recognizer ever matches, so a title receives primitive touch events but no tap, drag, hold, pinch, rotation or flick event. Handle and pointer arguments are still checked across all query entry points. Error codes follow the 0x80D1 values main already uses in this file; KytyPS5 uses 0x8089 (INVALID_ARGUMENT 0x80890001, INVALID_HANDLE 0x80890006), and which one the console returns is not verified. sceSystemGestureGetTouchRecognizerInformation returns the gesture type and rectangle given to sceSystemGestureCreateTouchRecognizer or UpdateTouchRecognizerRectangle, stored in the title's recognizer buffer in a layout private to this file, and always reports updated_time 0 because no recognizer is ever updated with input. It throws for a recognizer that was not created by sceSystemGestureCreateTouchRecognizer or has no rectangle, since the console's result in those cases is not known

Unknown function info

  • Primitive touch events (libSceSystemGesture) - sceSystemGestureUpdatePrimitiveTouchRecognizer reads the pad reports the title passes in, {int32 padHandle, int32 reportNumber, const ScePadData* padDataBuffer, 8 reserved bytes}, as fpPS4 records SceSystemGestureTouchPadData; padHandle is not checked and a report of a pad other than the one the title opened is not told apart. The touch states 0 inactive, 1 begin, 2 active and 3 end are the Vita ones in RPCS3, whose recognizer, rectangle and primitive event layouts are the ones main already uses, and no public source states the PS5 values. A primitive keeps the touch id the pad reports, its positions are the pad's touchpad coordinates unscaled, delta_time and elapsed_time come from the reports' own timestamp, and is_updated is 1 for a primitive whose state or position changed in the update; the console's units, scaling and is_updated rule are unverified. An ended touch stays readable as one end event until the next report sampled drops it. A null pInputData, a null padDataBuffer or a reportNumber of 0 or less leaves the events unchanged and returns success, an event buffer shorter than the event count reports as many events as it holds, and sceSystemGestureGetPrimitiveTouchEventByPrimitiveID throws for an id that no tracked touch has; what the console answers in those cases is not known