upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/pe_loader.cpp
diff options
context:
space:
mode:
authorkawaii-shakal <deusex1998@gmail.com>2026-11-25 09:29:04 +0500
committerkawaii-shakal <deusex1998@gmail.com>2026-11-25 09:29:04 +0500
commita05f1f3cdbb534d3261f8c557f39b637ac240ca8 (patch)
tree88f191dcd4e54e532b128bbbd1af8e1516408e5a /runtime/src/pe_loader.cpp
parentc7e82e26eadeac237da66949b64e7a52b718361e (diff)
gameinput: queue only events a callback wants, so a later pad's connect is not stuck behind a backlog (RT-GAMEINPUT-LATE-PAD)
A pad connected after the title started was seen by the shim but not by the title, while pads present at start worked. Pads present at start reach a title through blocking enumeration, which runs synchronously in RegisterDeviceCallback. A later pad reaches it only through a queued connect event. queue_event queued every reading and guide change whether or not any callback listened. With a dispatcher held, a title that runs one item a frame (Dispatch(0), the pattern Microsoft's Dispatch page suggests) falls further behind every frame, because a moving stick or a sensor pad's 125 Hz stream queues items faster. The later pad's connect event then never comes out of the queue. queue_event now drops an event no registered callback matches, as GameInput has no work to dispatch then. The first few RegisterDeviceCallback calls and the first CreateDispatcher and Dispatch calls are logged, so a retail run shows whether the title holds a dispatcher (not yet confirmed for the retail title). Test: test_late_pad_behind_dispatcher. A title with a dispatcher registers its device callback with no pad, a first pad moves on every poll, and a pad attached later must reach the callback within ten frames of Dispatch(0). Without the fix it fails (2 of 371 checks); with it, 371 checks pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/pe_loader.cpp')
0 files changed, 0 insertions, 0 deletions