mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 21:15:43 +00:00
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.
15 lines
369 B
Modula-2
15 lines
369 B
Modula-2
LIBRARY xinput1_3.dll
|
|
EXPORTS
|
|
DllMain @1
|
|
XInputGetState @2
|
|
XInputSetState @3
|
|
XInputGetCapabilities @4
|
|
XInputEnable @5
|
|
XInputGetDSoundAudioDeviceGuids @6
|
|
XInputGetBatteryInformation @7
|
|
XInputGetKeystroke @8
|
|
XInputGetStateEx @100
|
|
XInputWaitForGuideButton @101
|
|
XInputCancelGuideButtonWait @102
|
|
XInputPowerOffController @103
|