Commit Graph
2 Commits
Author SHA1 Message Date
The412Banner 13f4babcd0 feat(bionic): dd-directinput pass-through mode, switchable while the game runs
dd-directinput gets a second mode: every XInput call goes to Wine's own xinput (the
dd-directinput-wine-xinput.dll copy it already loads for rumble), as if the DLL were not
there. A background thread reads the mode file every 250 ms ('1' direct, '0' pass-through),
so the mode can change while the game runs; DroidDeck's in-game menu can switch it later
by writing that file. The same thread now does the once-a-second ring and pad-node checks,
so a game thread never waits on a file (they run in the calls only if the thread cannot
start).

launch.sh writes the mode file next to the controller folder (FAKE_EVDEV_DIR's parent,
dd-directinput.mode) and names it in DD_DIRECTINPUT_CONTROL; DD_DIRECTINPUT=0 now starts
the game in pass-through instead of leaving the DLLs out.
2026-12-06 01:36:30 -05:00
The412Banner 9ad5961e4c feat(bionic): dd-directinput, XInput from the pad state for games started without Steam
Wine's xinput reads the HID reports winebus makes from the evdev events fakeinput replays
out of each controller ring, through a queue per handle. A game that reads them slower
than the pad reports gets old stick positions: in Halo: The Master Chief Collection the
character kept moving for a second or two after the stick was let go (Bionic r104,
"Start without Steam"; turning vibration off in DroidDeck and in the game changed nothing).

dd-directinput is an XInput DLL set (xinput1_1..1_4, 9_1_0, uap; ARM64X for system32,
i386 for syswow64) that answers XInputGetState from the snapshot of the whole pad
FakeInputWriter keeps in each ring file's header (seqlock, read with 32-bit loads only).
XInputSetState returns at once; a worker thread hands rumble changes to a renamed copy of
Wine's builtin xinput1_4 (dd-directinput-wine-xinput.dll), so rumble keeps DroidDeck's
force-feedback path without Wine's lock holding up a game thread. Based on Bannerlator's
direct XInput DLL (GPL-3.0).

launch.sh copies the DLLs into the prefix (replacing the links to the tool's builtins,
never writing through them) and sets xinput*=n,b when the game is set to start without
Steam; DD_DIRECTINPUT=0 keeps Wine's own, and a game no longer set to start without Steam
gets Wine's links back. tools/bionic-runtime/build.sh builds and checks the DLLs (export
tables of both ARM64X views, imports, no TLS directory, version resource) and runs the
host test of the ring reader.
2026-12-06 01:14:11 -05:00