Automatically use virtual display if no active display is detected

This commit is contained in:
Yukino Song
2025-05-12 21:31:14 +08:00
parent e231803ec2
commit 8aff38cf7c
3 changed files with 38 additions and 29 deletions

View File

@@ -223,7 +223,12 @@ namespace proc {
});
#ifdef _WIN32
if (config::video.headless_mode || launch_session->virtual_display || _app.virtual_display) {
if (
config::video.headless_mode // Headless mode
|| launch_session->virtual_display // User requested virtual display
|| _app.virtual_display // App is configured to use virtual display
|| !video::allow_encoder_probing() // No active display presents
) {
if (vDisplayDriverStatus != VDISPLAY::DRIVER_STATUS::OK) {
// Try init driver again
initVDisplayDriver();