From dfa39abfb54442a45259dd50c02e4e64ef7752ac Mon Sep 17 00:00:00 2001 From: Yukino Song Date: Wed, 22 Jan 2025 17:18:08 +0800 Subject: [PATCH] Do not change resolution on resume when current session is using virtual display --- src/nvhttp.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/nvhttp.cpp b/src/nvhttp.cpp index 864116cd..6249efb1 100644 --- a/src/nvhttp.cpp +++ b/src/nvhttp.cpp @@ -1152,10 +1152,10 @@ namespace nvhttp { } auto launch_session = make_launch_session(host_audio, 0, args, named_cert_p); - if (no_active_sessions) { - // We want to prepare display only if there are no active sessions at - // the moment. This should be done before probing encoders as it could - // change the active displays. + if (no_active_sessions && !proc::proc.virtual_display) { + // We want to prepare display only if there are no active sessions + // and the current session isn't virtual display at the moment. + // This should be done before probing encoders as it could change the active displays. display_device::configure_display(config::video, *launch_session); // Probe encoders again before streaming to ensure our chosen