mirror of
https://github.com/games-on-whales/inputtino.git
synced 2026-10-15 12:52:02 +00:00
[PR #40] [3/5] Runtime uhid/uinput backend selection + self-describing udev #43
Labels
No labels
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/inputtino#43
Loading…
Add table
Add a link
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?
📋 Pull Request Information
Original PR: https://github.com/games-on-whales/inputtino/pull/40
Author: @kmreisi
Created: 6/24/2026
Status: 🔄 Open
Base:
stable← Head:feature/runtime-uhid-uinput-joypads📝 Commits (8)
2ca4e07Align PS5 MAC handling via shared uhid helpers7a88920Introduce Mac struct with shared helpers342f6c3Use pooled MAC allocation with reuse on releaseb24e301fix(mac): monotonic counter allocation, validate parse inputd010cdbrefactor(uhid): move find_uhid_sys_nodes out of the headerb4f7fe9test(capi): assert every switch node path, not just the first52736d1Share get_nodes() via sys_nodes_to_dev_paths helper49d35fefeat(joypad): runtime uhid/uinput selection + self-describing udev📊 Changes
22 files changed (+1222 additions, -287 deletions)
View changed files
📝
CMakeLists.txt(+17 -5)📝
include/inputtino/input.hpp(+247 -71)➕
include/inputtino/mac.hpp(+42 -0)➕
src/host_capability.cpp(+84 -0)➕
src/mac.cpp(+103 -0)➕
src/udev_helpers.hpp(+63 -0)➕
src/uhid/include/uhid/joypad_common.hpp(+64 -0)📝
src/uhid/include/uhid/protected_types.hpp(+8 -14)📝
src/uhid/include/uhid/uhid.hpp(+38 -5)📝
src/uhid/joypad_ps5.cpp(+183 -125)➕
src/uhid/uhid.cpp(+50 -0)📝
src/uinput/include/inputtino/protected_ps5_types.hpp(+1 -1)📝
src/uinput/include/inputtino/protected_types.hpp(+2 -0)📝
src/uinput/joypad_nintendo.cpp(+14 -3)📝
src/uinput/joypad_ps.cpp(+24 -33)📝
src/uinput/joypad_utils.hpp(+38 -0)📝
src/uinput/joypad_xbox.cpp(+8 -1)📝
tests/CMakeLists.txt(+3 -0)📝
tests/testCAPI.cpp(+11 -7)➕
tests/testFactory.cpp(+82 -0)...and 2 more files
📄 Description
[3/5]in the dynamic-UHID-joypads roadmap — see #44.The runtime joypad factory + udev self-description.
is_uhid_supported()+Joypad::create(Joypad::TYPE, def, prefer_uhid): the richuhid pad when
/dev/uhidis reachable, the uinput pad otherwise.Joypad::TYPEisnested in
Joypad, matching inputtino's other enums.Joypadbase as no-op virtuals.get_udev_events()/get_udev_hw_db_entries()).set_gyro()/set_accel()base motion virtuals;set_motion()kept as a PS5 shim.Joypad::default_definition(Joypad::TYPE)exposes each type's identity.The factory is purely additive — the existing per-type API (
PS5Joypad::create,set_motion, …) is untouched, so the current consumers (Sunshine, wolf) keepcompiling and adopting the factory is optional.
Stacks on #43. Builds, tests pass, Sunshine + wolf compile.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.