forked from unom/punktfunk
Device Manager, the firewall list and the monitor name all said "punktfunk". The brand
is Punktfunk.
Renamed: the [Strings] blocks of all four driver INFs (device descriptions, install
disks, provider, manufacturer), the `description` on every SwDeviceProfile the host
creates, pf-mouse's HID manufacturer + product strings, pf-vdisplay's IddCx endpoint
friendly + manufacturer names, the EDID 0xFC display-name descriptor — so Windows now
shows `Generic Monitor (Punktfunk)` — and the netsh firewall rule names.
The EDID edit is a single byte (0x70 -> 0x50) and needs no hand-patched checksum:
Edid::generate_with already recomputes both block checksums after patching the serial.
Deliberately left lowercase, because these are IDENTITIES rather than display names and
renaming them would orphan installed state:
* the SwDeviceCreate enumerator `w!("punktfunk")` — it IS the SWD\PUNKTFUNK\... path
every pad instance id is built from
* pf-paths' `join("punktfunk")` — C:\ProgramData\punktfunk
* the CN=punktfunk-driver cert subject, which purge_driver_certs and both driver build
scripts match by string
* install.rs' `lo.contains("punktfunk virtual display")` probes, whose haystack is
to_ascii_lowercase()d, so they already match the capitalised name
Nothing is orphaned by the renames that DID happen either: netsh rule names,
Get-NetFirewallRule -DisplayName and PowerShell's -match are all case-insensitive, so
the firewall delete paths and reset-pf-vdisplay.ps1's -AdapterName / -GhostMatch
defaults still reap what every release up to 0.22.1 created.
Cosmetic, with two consequences worth knowing: it takes a driver rebuild + re-sign to
appear at all, and an existing devnode keeps its cached FriendlyName until it is
recreated.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
103 lines
3.8 KiB
Plaintext
103 lines
3.8 KiB
Plaintext
;/*++
|
|
; punktfunk virtual gamepads — UMDF2 HID minidriver INF.
|
|
; One package, four hardware ids: DualSense, DualShock 4, DualSense Edge, Steam Deck — which is why
|
|
; the package is called pf_gamepad and not pf_dualsense (it never was one identity).
|
|
;
|
|
; ⚠️ The HARDWARE IDS below deliberately keep their old names (`pf_dualsense`, `pf_dualshock4`,
|
|
; `pf_dualsenseedge`, `pf_steamdeck`). They are the binding contract with every devnode the host
|
|
; SwDeviceCreate's and with every already-installed system; renaming them would orphan existing
|
|
; installs and buy nothing. Only the PACKAGE identity (INF/CAT/DLL/service) moved to pf_gamepad.
|
|
; Adapted from the WDK vhidmini2 UMDF2 sample (VhidminiUm.inx).
|
|
; Depends on MsHidUmdf.inf (build >= 22000).
|
|
; Install: devgen /add /hardwareid "root\pf_dualsense" (after pnputil /add-driver /install)
|
|
;--*/
|
|
[Version]
|
|
Signature="$WINDOWS NT$"
|
|
Class=HIDClass
|
|
ClassGuid={745a17a0-74d3-11d0-b6fe-00a0c90f57da}
|
|
Provider=%ProviderString%
|
|
CatalogFile=pf_gamepad.cat
|
|
PnpLockdown=1
|
|
|
|
[DestinationDirs]
|
|
DefaultDestDir = 13
|
|
|
|
[SourceDisksNames]
|
|
1=%Disk_Description%,,,
|
|
|
|
[SourceDisksFiles]
|
|
pf_gamepad.dll=1
|
|
|
|
[Manufacturer]
|
|
%ManufacturerString%=pf, NT$ARCH$.10.0...22000
|
|
|
|
[pf.NT$ARCH$.10.0...22000]
|
|
; Hardware ids: `root\pf_dualsense` for a root-enumerated devnode (devgen/devcon tests); `pf_dualsense`
|
|
; for the host's SwDeviceCreate'd DualSense (the `root\` prefix is reserved for root enumeration, so
|
|
; SwDeviceCreate rejects it with E_INVALIDARG); `pf_dualshock4` / `pf_dualsenseedge` / `pf_steamdeck`
|
|
; for the host's other virtual pads — ONE driver binds all of them (every model line below installs
|
|
; the same `pfGamepad` section) and serves the matching HID identity per the device_type byte the
|
|
; host stamps into shared memory.
|
|
;
|
|
; Each id carries its OWN description: Device Manager reads this string, and a single shared
|
|
; "Virtual DualSense" made an emulated DualShock 4 look like the controller-type setting had been
|
|
; ignored. The HID layer (VID/PID, report descriptor, product string) was always per-type; this
|
|
; makes the human-readable name agree with it.
|
|
%DeviceDesc%=pfGamepad, root\pf_dualsense, pf_dualsense
|
|
%DeviceDescDS4%=pfGamepad, pf_dualshock4
|
|
%DeviceDescEdge%=pfGamepad, pf_dualsenseedge
|
|
%DeviceDescDeck%=pfGamepad, pf_steamdeck
|
|
|
|
[pfGamepad.NT]
|
|
CopyFiles=UMDriverCopy
|
|
Include=MsHidUmdf.inf
|
|
Needs=MsHidUmdf.NT
|
|
Include=WUDFRD.inf
|
|
Needs=WUDFRD_LowerFilter.NT
|
|
|
|
[pfGamepad.NT.hw]
|
|
Include=MsHidUmdf.inf
|
|
Needs=MsHidUmdf.NT.hw
|
|
Include=WUDFRD.inf
|
|
Needs=WUDFRD_LowerFilter.NT.hw
|
|
|
|
[pfGamepad.NT.Services]
|
|
Include=MsHidUmdf.inf
|
|
Needs=MsHidUmdf.NT.Services
|
|
Include=WUDFRD.inf
|
|
Needs=WUDFRD_LowerFilter.NT.Services
|
|
|
|
[pfGamepad.NT.Filters]
|
|
Include=WUDFRD.inf
|
|
Needs=WUDFRD_LowerFilter.NT.Filters
|
|
|
|
[pfGamepad.NT.Wdf]
|
|
UmdfService="pf_gamepad", pf_gamepad_Install
|
|
UmdfServiceOrder=pf_gamepad
|
|
UmdfKernelModeClientPolicy=AllowKernelModeClients
|
|
UmdfFileObjectPolicy=AllowNullAndUnknownFileObjects
|
|
UmdfMethodNeitherAction=Copy
|
|
UmdfFsContextUsePolicy=CanUseFsContext2
|
|
; Each pad gets its OWN WUDFHost so the driver's per-pad statics (incl. the shm index) don't collide
|
|
; across multiple simultaneous controllers (multi-pad).
|
|
UmdfHostProcessSharing=ProcessSharingDisabled
|
|
|
|
[pf_gamepad_Install]
|
|
UmdfLibraryVersion=$UMDFVERSION$
|
|
ServiceBinary="%13%\pf_gamepad.dll"
|
|
|
|
[UMDriverCopy]
|
|
pf_gamepad.dll
|
|
|
|
[Strings]
|
|
ProviderString ="Punktfunk"
|
|
ManufacturerString ="Punktfunk"
|
|
ClassName ="HID device"
|
|
Disk_Description ="Punktfunk Gamepad Installation Disk"
|
|
; One per hardware id — these are what Device Manager shows. Keep them aligned with the product
|
|
; strings the driver serves per device_type (src/lib.rs `on_get_string`).
|
|
DeviceDesc ="Punktfunk Virtual DualSense"
|
|
DeviceDescDS4 ="Punktfunk Virtual DualShock 4"
|
|
DeviceDescEdge ="Punktfunk Virtual DualSense Edge"
|
|
DeviceDescDeck ="Punktfunk Virtual Steam Deck Controller"
|