Files
punktfunk/packaging/windows/drivers/pf-xusb/pf_xusb.inx
T
enricobuehler d2a2bcc25d feat(drivers/pf-xusb): answer the async input wait, and put xinputhid on the stack
The two things this driver's README has always listed as the missing WGI/GameInput work,
both user-mode, neither needing a bus driver:

`IOCTL_XUSB_WAIT_FOR_INPUT` is now pended on a manual queue and completed by the periodic
timer on a dwPacketNumber edge, answering with the same 29-byte GET_STATE payload the
synchronous path serves. Declining it was enough for classic xinput1_4, which just falls
back to sync GET_STATE polling — that is why the pad has always worked there. It is not
enough for WGI/GameInput, which poll asynchronously: to them a decline is a refusal, not
a fallback. Completion is edge-gated because releasing a waiter on an unchanged packet
spins its caller at timer rate. WAIT_GUIDE_BUTTON stays declined — we have no state to
signal on.

The INF adds UpperFilters=xinputhid on the XUSB devnode. Note the earlier attempt put
that filter on the HID child of the *other* backend, which was simply the wrong devnode:
XInput does not read HID at all, it enumerates GUID_DEVINTERFACE_XUSB, which is what this
driver registers.

Verified on .173: build + sign + catalog exit 0; infverif "INF is VALID"; the devnode
starts Status OK with UpperFilters=xinputhid readable back from its enum key; and XInput
still sees the pad (slot 1 live alongside the box's real Elite in slot 0), so the async
queue is no regression to the path that already worked.

NOT yet measured: whether WGI/GameInput now admit the pad. `IG_` is the wrong probe for
this driver — it is a HID-path artifact and pf-xusb is System-class with no HID child, so
its absence says nothing either way. That needs a real WinRT/GameInput enumeration test.
2026-08-09 17:29:10 +02:00

76 lines
2.4 KiB
Plaintext

;/*++
; punktfunk virtual Xbox 360 XUSB companion — a non-HID UMDF2 driver that registers the XUSB
; device-interface GUID {EC87F1E3-...} and answers the buffered XInput IOCTLs, so classic
; XInputGetState() reads the pad without a kernel bus driver (the HIDMaestro approach). System class,
; hosted by the in-box WUDFRd reflector. Created per-session by the host via SwDeviceCreate
; (hardware id `pf_xusb`); `root\pf_xusb` is the devgen/devcon test id.
;--*/
[Version]
Signature = "$WINDOWS NT$"
Class = System
ClassGuid = {4D36E97D-E325-11CE-BFC1-08002BE10318}
Provider = %ProviderString%
CatalogFile = pf_xusb.cat
PnpLockdown = 1
[DestinationDirs]
DefaultDestDir = 13
[SourceDisksNames]
1 = %DiskId1%,,,""
[SourceDisksFiles]
pf_xusb.dll = 1,,
[Manufacturer]
%StdMfg%=Standard, NT$ARCH$.10.0...22000
[Standard.NT$ARCH$.10.0...22000]
%DeviceDesc%=pfXusb, root\pf_xusb, pf_xusb
[pfXusb.NT]
CopyFiles=Drivers_Dir
Include=WUDFRD.inf
Needs=WUDFRD.NT
[Drivers_Dir]
pf_xusb.dll
[pfXusb.NT.HW]
Include=WUDFRD.inf
Needs=WUDFRD.NT.HW
AddReg=pfXusb_HW_AddReg
; The WGI/GameInput admission tripwire. Classic `xinput1_4` needs nothing here — it finds us by the
; XUSB device-interface GUID and polls GET_STATE, which is why the pad has always worked there
; (verified on .173 2026-08-09: our pad takes XInput slot 1 with live state). WGI and GameInput
; instead expect the in-box `xinputhid` filter on the stack, and without it they never admit the
; device however correct its IOCTL surface is. Pairs with the async WAIT_FOR_INPUT pump in
; src/lib.rs — the filter and the async wait are the two halves this driver's README has always
; listed as the missing WGI work; neither needs kernel-mode code.
[pfXusb_HW_AddReg]
HKR,,"UpperFilters",0x00010000,"xinputhid"
[pfXusb.NT.Services]
Include=WUDFRD.inf
Needs=WUDFRD.NT.Services
[pfXusb.NT.Wdf]
UmdfService=pf_xusb, pfXusb_Install
UmdfServiceOrder=pf_xusb
UmdfKernelModeClientPolicy=AllowKernelModeClients
UmdfFileObjectPolicy=AllowNullAndUnknownFileObjects
UmdfMethodNeitherAction=Copy
UmdfFsContextUsePolicy=CanUseFsContext2
UmdfHostProcessSharing=ProcessSharingDisabled
[pfXusb_Install]
UmdfLibraryVersion=$UMDFVERSION$
ServiceBinary=%13%\pf_xusb.dll
[Strings]
ProviderString = "Punktfunk"
StdMfg = "(Standard system devices)"
DiskId1 = "Punktfunk XUSB Installation Disk"
DeviceDesc = "Punktfunk Virtual Xbox 360 (XUSB)"