mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-05 12:35:42 +00:00
* fix(input): programs built with _FORTIFY_SOURCE read the virtual pads Fortified builds, Flatpak runtimes among them, call __read_chk, __poll_chk and __ppoll_chk in place of read, poll and ppoll, and glibc's versions go straight to the kernel. Such programs opened a pad through the shim but read its backing ring file instead of events, so they never saw input: Marathon Recompiled's SDL reads the pad through __read_chk. The shim now provides all three, with glibc's bounds checks, on the same paths as read, poll and ppoll. * fix(input): keep glibc's __read_chk for descriptors that are not pads Only pad descriptors take the shim's read path; the rest go to the next __read_chk, so fortified reads keep libc's cancellation point. The test also polls the empty ring with a zero timeout, which a __poll_chk that bypasses the shim would report as ready. --------- Co-authored-by: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com>