Commit Graph
3 Commits
Author SHA1 Message Date
LibretroAdmin a47190c550 input: a bind's capture reads a checked controller's buttons at once
The capture read a controller's 219 buttons one call at a time every
frame. For a driver the snapshot bridge has checked to answer
get_buttons() as it does button(), one call now writes them all where
the capture keeps them; any other driver is read as before.
2026-11-09 09:05:13 +01:00
LibretroAdmin 6c08a56bd0 menu: a bind's capture reads the keys at once and keeps its state as bits
The capture asked the input driver about each key by itself, 315 calls
a frame. It now asks once, through keys_down, which writes straight into
the bits the capture keeps; a driver without keys_down is read as
before.

The keys, buttons and mouse buttons are bits now, so a port's state goes
from 666 bytes to 148 and the two frames kept from 21.3 KB to 4.7 KB. A
press is found a word at a time.
2026-11-09 08:58:23 +01:00
davey 8079860f4b samples: add bind_capture regression test
bind_capture_test runs the shipping capture from input_driver.c and
menu_driver.c: mouse buttons from a published pointer frame and from a
driver that keeps a mouse per pad, and a user on another user's
controller slot binding with their mouse and pad.

The hotkey-sharer case guards the controller-slot meaning of the bind
state's port; it passes on master.
2026-11-09 08:31:56 +01:00