feat(host/windows): SudoVDA virtual-display backend (control path)

Windows VirtualDisplay backend driving SudoVDA (the Apollo IDD) via its DeviceIoControl IOCTL protocol: open by interface GUID, ADD at the client's exact WxH@Hz (mode baked into the IOCTL, no EDID seeding), mandatory watchdog ping thread, QueryDisplayConfig name resolution, RAII Drop -> REMOVE. Wired behind the existing VirtualDisplay trait (open()/probe() Windows arms). Validated live on the GPU-less VM (standalone + via the trait, env-gated test): version 0.2.1, ADD 1920x1080@60 -> target, watchdog hold, REMOVE. Monitor activation into a WDDM path (-> capturable \\.\DisplayN) needs a real GPU and is deferred with capture/NVENC. docs/windows-host.md updated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-15 00:05:40 +00:00
parent 9775794ba5
commit 26741feada
5 changed files with 508 additions and 8 deletions
+17 -4
View File
@@ -456,10 +456,16 @@ pub fn open(compositor: Compositor) -> Result<Box<dyn VirtualDisplay>> {
Compositor::Wlroots => Ok(Box::new(wlroots::WlrootsDisplay::new()?)),
}
}
#[cfg(not(target_os = "linux"))]
#[cfg(target_os = "windows")]
{
// Windows has a single virtual-display backend (SudoVDA); the compositor arg is moot.
let _ = compositor;
Ok(Box::new(sudovda::SudoVdaDisplay::new()?))
}
#[cfg(not(any(target_os = "linux", target_os = "windows")))]
{
let _ = compositor;
anyhow::bail!("virtual displays require Linux (Wayland compositor)")
anyhow::bail!("virtual displays require Linux or Windows")
}
}
@@ -480,10 +486,15 @@ pub fn probe(compositor: Compositor) -> Result<()> {
Compositor::Gamescope | Compositor::Mutter | Compositor::Wlroots => Ok(()),
}
}
#[cfg(not(target_os = "linux"))]
#[cfg(target_os = "windows")]
{
let _ = compositor;
anyhow::bail!("virtual displays require Linux (Wayland compositor)")
sudovda::probe()
}
#[cfg(not(any(target_os = "linux", target_os = "windows")))]
{
let _ = compositor;
anyhow::bail!("virtual displays require Linux or Windows")
}
}
@@ -527,6 +538,8 @@ mod kwin;
mod mutter;
#[cfg(target_os = "linux")]
mod wlroots;
#[cfg(target_os = "windows")]
mod sudovda;
#[cfg(test)]
mod tests {