@@ -151,21 +151,22 @@ opencontroller-windows-vhf-setup --report-profile switch
151151```
152152
153153The generated driver source is a WDK/KMDF starting point that wires the shared
154- descriptor with rumble output into ` VHF_CONFIG_INIT ` , creates and starts a VHF
155- device, accepts an OpenController HID input report through a buffered
156- IOCTL, and submits it with ` VhfReadReportSubmit ` . It also registers
154+ descriptor with rumble and light output into ` VHF_CONFIG_INIT ` , creates and
155+ starts a VHF device, accepts an OpenController HID input report through a
156+ buffered IOCTL, and submits it with ` VhfReadReportSubmit ` . It also registers
157157` EvtVhfAsyncOperationWriteReport ` so host HID output reports can be captured as
158- 5-byte rumble packets and exposed to the user-mode host bridge through a read
159- IOCTL . It still needs a signed driver package and a reviewed user-mode host path
160- before installation.
158+ 5-byte rumble packets and 7-byte light/player-indicator packets, then exposed to
159+ the user-mode host bridge through read IOCTLs . It still needs a signed driver
160+ package and a reviewed user-mode host path before installation.
161161
162162The generated host bridge C source reads OpenController native bridge JSONL from
163163stdin, prefers direct ` hidReportBase64 ` payloads, falls back to converting
164164legacy ` reportBase64 ` XInput packets, opens the VHF driver with ` CreateFileA ` ,
165165and writes HID reports through ` DeviceIoControl ` . A background feedback
166- thread polls the driver's rumble IOCTL and emits ` opencontroller.bridge.feedback `
167- JSONL on stdout so ` NativeProcessBridgeAdapter ` can surface host haptics through
168- ` controller.onFeedback(...) ` . Set ` OPENCONTROLLER_CONTROLLER_ID ` or pass
166+ thread polls the driver's rumble and light IOCTLs and emits
167+ ` opencontroller.bridge.feedback ` JSONL on stdout so
168+ ` NativeProcessBridgeAdapter ` can surface host haptics and light/player-indicator
169+ changes through ` controller.onFeedback(...) ` . Set ` OPENCONTROLLER_CONTROLLER_ID ` or pass
169170` --controller-id ` when the host bridge is reading a shared stream so each virtual
170171device only reacts to its assigned controller.
171172
@@ -184,6 +185,7 @@ const controller = await createController({
184185 adapter: createWindowsVhfHostBridgeAdapter ({
185186 controllerId: " player-1" ,
186187 supportsRumble: true ,
188+ supportsLights: true ,
187189 hostBridgePath: " C:\\ OpenController\\ OpenControllerVhfHostBridge.exe" ,
188190 devicePath: " \\\\ .\\ OpenControllerVhfGamepad"
189191 }),
@@ -194,6 +196,9 @@ controller.onFeedback((event) => {
194196 if (event .type === " rumble" ) {
195197 console .log (event .weakMotor , event .strongMotor );
196198 }
199+ if (event .type === " lights" ) {
200+ console .log (event .red , event .green , event .blue , event .playerLightMask );
201+ }
197202});
198203```
199204
@@ -217,6 +222,6 @@ emits for native bridge processes.
217222 commands only
218223- generated host bridge source still needs a Windows build project and signed
219224 device install verification
220- - rumble feedback requires the generated VHF driver and host bridge to be built
225+ - feedback requires the generated VHF driver and host bridge to be built
221226 together so their submit/pop IOCTL function codes match
222227- legacy ViGEmBus diagnostics are compatibility-only
0 commit comments