libSceSystemGesture: 13 exports still throw on the no-touch path; branch ready #3109
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by Silverash-i8 on 2026-10-10T22:23:01Z.
libSceSystemGesturealready behaves like a device whose touch recognizers never report anything (Openreturns one handle,CreateTouchRecognizersucceeds,GetTouchEventsCountis 0), but 13 of its 22 exports still throw. A title that appends a recognizer, polls its events or reads its information stops even though nothing could ever be reported.Branch:
Silverash-i8/AnyPS5-fork:feat/system-gesture-no-touch, one commitd1e20908onmaindc105f8a.Eleven of the 13 now follow the existing no-touch behaviour, using only the error codes the file already had:
AppendTouchRecognizer,RemoveTouchRecognizer,ResetTouchRecognizer,ResetPrimitiveTouchRecognizerandUpdateAllTouchRecognizersucceed on the open handle (INVALID_HANDLEotherwise,INVALID_ARGUMENTfor a null recognizer).GetTouchEventsandGetPrimitiveTouchEventsreport 0 events, andGetPrimitiveTouchEventsCountreturns 0.GetPrimitiveTouchEventByIndexreturnsINDEX_OUT_OF_ARRAY, like the touch version already does.CreateTouchRecognizernow keeps the recognizer's type and rectangle in the title's recognizer buffer, soGetTouchRecognizerInformationreports them (withupdated_time0) andUpdateTouchRecognizerRectanglechanges the rectangle. The buffer's console layout is unknown, so this uses its first bytes as our own state.GetTouchEventByEventIDandGetPrimitiveTouchEventByPrimitiveIDstill throw. No event is ever reported, so a title never has an ID to pass, and I don't have a verified "not found" code.The behaviour is in
docs/dev/TechnicalDebt.mdnext tolibSceUsbd's no-device entry. That includes the fact that the error codes are the ones the file already used, which I couldn't verify (shadPS4 only has logging stubs for this library).Tested on Windows 11, WinLibs GCC 15.2.0 r7, Release. A new
guest_system_gesturetest covers each implemented call, including the handle and null-argument errors and the type and rectangle round trip, and it passes along withpatched_libraries.tools/check_conventions.py --base upstream/mainpasses.tools/progress.pygoes from 2726/3225 to 2737/3225 library functions.AI-assisted (Claude Code); I ran everything above on my machine.
Imported from boykopovar/AnyPS5. Originally posted by Silverash-i8 on 2026-10-11T00:46:26Z.
Most of this landed through #3174 (xXPBSXx's branch from #3144, carried by adriadam10), so
feat/system-gesture-no-touchis superseded. The one call that branch had andmainstill throws on issceSystemGestureGetTouchRecognizerInformation, so I've put just that on a fresh branch on top of currentmain:feat/system-gesture-recognizer-info, commit62648a0fsceSystemGestureCreateTouchRecognizerkeeps the type and rectangle at the start of the title's recognizer buffer (it's 2888 bytes and opaque to the title; the layout is ours since the console's isn't known). A null rectangle stores zeros.UpdateTouchRecognizerRectanglereplaces the stored rectangle.GetTouchRecognizerInformationreturns both, withupdated_time0 because no touch input ever updates a recognizer. Handle and null checks match the rest of the file.guest_system_gesturepassed a 4-byteintas the recognizer and the rectangle. Since the rectangle is now written into the recognizer, I switched those to the realSystemGestureTouchRecognizerandSystemGestureRectangletypes, and added checks for create, update and read back, a null rectangle, and the invalid handle and argument cases.Tested on Windows 11, WinLibs GCC 15.2.0 r7, Release,
main06da1176:guest_system_gestureandpatched_librariespass, andtools/check_conventions.py --base upstream/mainpasses.The two ID lookups (
GetPrimitiveTouchEventByPrimitiveID,GetTouchEventByEventID) still throw on both, since I couldn't find what they return when no event exists.AI-assisted (Claude Code); I ran everything above on my machine.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-11T01:08:54Z.
Closing: #3174 covers these calls.
GetTouchRecognizerInformationand the two ID lookups keep throwing until their layout and not-found codes are known.