Files
riojoy/driver/RioGamepad/RioGamepad.inf
T
CydandClaude Opus 4.8 38ffb27458 Fix RioGamepad Code 31: add VHF lower filter + joy.cpl friendly name
The driver installed but the device failed with Code 31
(CM_PROB_FAILED_ADD): VhfCreate returned STATUS_INVALID_DEVICE_REQUEST
(0xC0000010) because vhf.sys was never attached beneath the FDO. Add the
required LowerFilters=vhf AddReg to the INF so VHF loads as a lower
filter; the device now starts clean and enumerates in joy.cpl.

A VHF virtual HID device cannot supply a HID product string (VHF_CONFIG
has no string field and VHF owns IOCTL_HID_GET_STRING), so register the
DirectInput OEMName (VID_1209&PID_5249 -> RIOJoy Virtual Gamepad) in
install.ps1 -CreateDevice and remove it in uninstall.ps1, giving the
controller a proper name instead of the generic VHF default.

Also fix a non-ASCII em-dash in sign.ps1 that broke parsing under
Windows PowerShell 5.1 (UTF-8 without BOM), and document the Code 52 /
Code 31 / friendly-name troubleshooting in driver/README.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 23:39:55 -05:00

65 lines
1.6 KiB
INI

;
; RioGamepad.inf — RIOJoy virtual HID gamepad (KMDF + VHF), root-enumerated.
;
[Version]
Signature = "$WINDOWS NT$"
Class = System
ClassGuid = {4d36e97d-e325-11ce-bfc1-08002be10318}
Provider = %ManufacturerName%
CatalogFile = RioGamepad.cat
DriverVer =
PnpLockdown = 1
[DestinationDirs]
DefaultDestDir = 13
[SourceDisksNames]
1 = %DiskName%
[SourceDisksFiles]
RioGamepad.sys = 1
[Manufacturer]
%ManufacturerName% = Standard,NT$ARCH$.10.0...16299
[Standard.NT$ARCH$.10.0...16299]
%DeviceName% = RioGamepad_Device, root\RioGamepad
[RioGamepad_Device.NT]
CopyFiles = RioGamepad_CopyFiles
[RioGamepad_CopyFiles]
RioGamepad.sys
; VHF (vhf.sys) must sit beneath this FDO as a lower filter, otherwise
; VhfCreate fails in EvtDeviceAdd with STATUS_INVALID_DEVICE_REQUEST
; (0xC0000010) and the device shows Code 31 (CM_PROB_FAILED_ADD).
[RioGamepad_Device.NT.HW]
AddReg = RioGamepad_Device.NT.AddReg
[RioGamepad_Device.NT.AddReg]
HKR,, "LowerFilters", 0x00010000, "vhf"
[RioGamepad_Device.NT.Services]
AddService = RioGamepad, 0x00000002, RioGamepad_Service
[RioGamepad_Service]
DisplayName = %ServiceName%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %13%\RioGamepad.sys
[RioGamepad_Device.NT.Wdf]
KmdfService = RioGamepad, RioGamepad_wdfsect
[RioGamepad_wdfsect]
KmdfLibraryVersion = 1.15
[Strings]
ManufacturerName = "VWE"
DiskName = "RioGamepad Installation Disk"
DeviceName = "RIOJoy Virtual Gamepad"
ServiceName = "RIOJoy Virtual Gamepad Service"