mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-22 10:50:15 -10:00
The DualShock 3, DualShock 4, DualSense and both Switch Pro handlers, and the generic pads read from their report descriptors, now keep their state as an input_pad_view_t, decoded straight into it and read by their getters. hidraw and winusb hand reports to the handlers only in their poll, so the state does not change between polls and they lend it through a new hid_driver_t view(), as udev and winraw lend theirs: the bridge reads it in place, with nothing copied. The beside layer passes view() through, so a WinUSB pad beside winraw is lent, and winraw's own pads stay lent while it is there instead of falling back to copies. A generic pad's hat is part of its view, which the drivers' hat reads now use. connect_parity holds each converted handler's view to its getters after every report, and the DualShock 3's axes to the copying handler's; hidraw_hid, winusb_hid and the frontend harness's beside lane check the lend.