mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-25 14:05:57 +00:00
The gamepad poll keeps its buttons by position, the Home button and the trigger axes, and input_pad_combo reads a combo setting
pad_read stores what pad_physical saw (pad_seen, by PAD_* position, with the Home / Guide button after the Switch buttons as PAD_GUIDE) and the two trigger axes (trigger_seen), under the input lock, for gamepad combos that are no Switch buttons and for analog trigger readers. input_pad_combo parses a setting of button positions joined with + (the bind_ lines' pad: names plus guide or home) into a mask, logging a name that is no button. input_map.c exports input_key_id and input_pad_id, and ui/binds_page.cpp binds_pad_label gives the label the open pad has on a button, so menu rows can name buttons as the Controls tab does. No behaviour changes on its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ebce67b367
commit
94c33b1d85
6 files changed
+54
-5
No files matched your search
@@ -91,6 +91,10 @@ void input_menu(int open);
|
||||
// of the combo, sticks are lx, ly, rx, ry. Returns 1 in the poll where the combo goes down (toggle the menu once).
|
||||
int input_menu_gate(int *held, int menu_open, uint64_t *buttons, int32_t sticks[4]);
|
||||
int input_overlay_gate(int *held, uint64_t *buttons); // L3+R3: 1 in the poll both go down
|
||||
// A gamepad combo setting: buttons by position joined with '+' (guide+south: Home and the bottom face button, the
|
||||
// pad: names of the bind_ lines plus guide or home). Bit p is PAD_* p, bit PAD_COUNT the Home button; 0 for an empty
|
||||
// value or one with a name that is no button, which logs a line naming env.
|
||||
uint32_t input_pad_combo(const char *env, const char *s);
|
||||
int input_pad_read(uint64_t *buttons, int32_t *lx, int32_t *ly);
|
||||
// The gamepad layout in effect (PAD_LAYOUT_*, input_map.h; TOTK_PAD_LAYOUT, live); -1 without a gamepad. Any thread.
|
||||
int input_pad_layout(void);
|
||||
|
||||
Reference in new issue
Block a user