sunshine-vdd-mode.ps1 is a Windows prep-command hook for upstream Sunshine and VirtualDrivers/Virtual-Display-Driver.
It reads Sunshine's SUNSHINE_CLIENT_WIDTH, SUNSHINE_CLIENT_HEIGHT, and SUNSHINE_CLIENT_FPS environment variables, validates the requested mode, and checks C:\VirtualDisplayDriver\vdd_settings.xml.
- Known modes continue without reloading VDD.
- Missing resolutions or refresh rates are added atomically.
- Fractional refresh rates are preserved to millihertz.
- VDD is refreshed with the supported UTF-16LE
SETDISPLAYCOUNT 1named-pipe command.