diff --git a/crates/punktfunk-host/src/inject.rs b/crates/punktfunk-host/src/inject.rs index 5a8befbb..4f29fadc 100644 --- a/crates/punktfunk-host/src/inject.rs +++ b/crates/punktfunk-host/src/inject.rs @@ -506,8 +506,9 @@ pub mod gamepad; #[cfg(target_os = "windows")] #[path = "inject/windows/gamepad_raii.rs"] mod gamepad_raii; -/// Shared virtual-pad creation-retry policy ([`pad_gate::PadGate`]) used by every backend manager on -/// both platforms — replaces the per-backend permanent `broken` latch with capped-backoff retry. +/// Shared virtual-pad creation-retry policy ([`pad_gate::PadGate`]), driven by [`pad_slots`] for +/// every backend manager — replaces the per-backend permanent `broken` latch with capped-backoff +/// retry. #[cfg(any(target_os = "linux", target_os = "windows"))] #[path = "inject/pad_gate.rs"] pub mod pad_gate; @@ -517,12 +518,6 @@ pub mod pad_gate; #[cfg(any(target_os = "linux", target_os = "windows"))] #[path = "inject/pad_slots.rs"] pub mod pad_slots; -/// The generic stateful virtual-pad manager ([`uhid_manager::UhidManager`]) — event routing, frame -/// merge, heartbeat, and feedback pump shared by the five UHID/UMDF backends; each supplies only -/// its per-controller protocol via [`uhid_manager::PadProto`] (G12). -#[cfg(any(target_os = "linux", target_os = "windows"))] -#[path = "inject/uhid_manager.rs"] -pub mod uhid_manager; /// Linux: virtual Steam Deck via UHID — the kernel `hid-steam` driver binds it as a real Deck. #[cfg(target_os = "linux")] #[path = "inject/linux/steam_controller.rs"] @@ -550,6 +545,12 @@ pub mod steam_remap; #[cfg(target_os = "linux")] #[path = "inject/linux/steam_usbip.rs"] pub mod steam_usbip; +/// The generic stateful virtual-pad manager ([`uhid_manager::UhidManager`]) — event routing, frame +/// merge, heartbeat, and feedback pump shared by the five UHID/UMDF backends; each supplies only +/// its per-controller protocol via [`uhid_manager::PadProto`] (G12). +#[cfg(any(target_os = "linux", target_os = "windows"))] +#[path = "inject/uhid_manager.rs"] +pub mod uhid_manager; /// Stub — virtual gamepads need Linux uinput or the Windows UMDF drivers; events are dropped elsewhere. #[cfg(not(any(target_os = "linux", target_os = "windows")))] pub mod gamepad { diff --git a/crates/punktfunk-host/src/inject/proto/dualshock4_proto.rs b/crates/punktfunk-host/src/inject/proto/dualshock4_proto.rs index 9bcae868..152e98e8 100644 --- a/crates/punktfunk-host/src/inject/proto/dualshock4_proto.rs +++ b/crates/punktfunk-host/src/inject/proto/dualshock4_proto.rs @@ -13,7 +13,6 @@ //! dualshock4_input_report_usb` / `_output_report_common` parse. use super::dualsense_proto::{DsState, Touch}; -use punktfunk_core::quic::HidOutput; /// DualShock 4 v2 USB identity (Sony Interactive Entertainment / CUH-ZCT2). pub const DS4_VENDOR: u16 = 0x054C; @@ -73,11 +72,10 @@ pub fn serialize_state(r: &mut [u8; DS4_INPUT_REPORT_LEN], st: &DsState, counter } /// What one feedback pass extracted from the device's HID output reports. Rumble rides the universal -/// 0xCA plane; the lightbar rides the HID-output 0xCD plane (DS4 has no player LEDs or adaptive -/// triggers, so those never appear). +/// 0xCA plane; the lightbar rides the HID-output 0xCD plane as a `Led` event (DS4 has no player LEDs +/// or adaptive triggers, so those never appear). #[derive(Default)] pub struct Ds4Feedback { - pub hidout: Vec, /// `(low, high)` motor levels (0..=0xFF00), if a report carried them. pub rumble: Option<(u16, u16)>, /// Lightbar RGB, if the report carried it (deduped by the manager).