Commit Graph

6 Commits

Author SHA1 Message Date
Ludovic Marie 6086758f94 DualSense output: rumble, LEDs and Bluetooth checked against SDL and the kernel
- Every report carries the motors; still motors send no rumble flags, as SDL
  stops rumble (a report without them ends the emulation and re-arms the
  audio haptics), so a trigger change no longer cuts a vibration.
- Legacy vibration at half strength (SDL); the Edge always takes V2; an
  unreadable firmware version falls back to legacy.
- The first report after opening clears the motor/trigger attenuation
  (flags 1 bit 6, byte 36; dualsensectl, pydualsense).
- The LED reset goes in a report of its own before any colour
  (hid-playstation's dualsense_reset_leds); over Bluetooth the colour waits
  for the connection animation (SDL's sensor clock check).
- Bluetooth output only where gilrs keeps reading the pad (Linux), else with
  HORIZON_DUALSENSE_BT=1: any output switches the pad to its full report.
- USB is preferred when the pad is on both.
- Tests pin the reset report and its CRC (zlib), the flags and the clock offset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 19:23:05 +02:00
Ludovic Marie ac955934b5 DualSense output over HID: the report, a writer thread, and rumble through it
The horizon-dualsense crate builds the DualSense's output report (USB 0x02,
Bluetooth 0x31 with its CRC-32 seeded with 0xA2) and writes it with hidapi
from a thread. The game sends its rumble pulses through it when the active
pad is a DualSense, so vibration now works on macOS too, and falls back to
gilrs force feedback when the pad can't be opened. Quitting frees the
triggers and stops the motors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 18:38:10 +02:00
Ludovic Marie 210a6f5ddd Controllers: focus follows scrolled lists, clipped targets, pad status shows focus
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 03:10:15 +02:00
Ludovic Marie 32bb3612fb Controllers: × for the PlayStation cross (the game fonts lack ✕)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 19:12:24 +02:00
Ludovic Marie 79ea17ffc5 Controllers: classic sliders are focus targets; the D-pad nudges with A held
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 18:42:19 +02:00
Ludovic Marie 0818190ee4 docs: controller support design note
Vanilla 26.3 has no gamepad code; Horizon's own design follows Bedrock's
default controller layout. Mapping, menus, glyphs, options file, rumble,
Steam Deck and the PR plan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 18:06:50 +02:00