From 91d5046122c641d3c141efe3d766e92f1f157c24 Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Sat, 15 Mar 2025 18:23:07 +0100 Subject: [PATCH] Set stream refresh rate on scene focused --- client/scenes/stream.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/client/scenes/stream.cpp b/client/scenes/stream.cpp index c9d0bd83..323782b3 100644 --- a/client/scenes/stream.cpp +++ b/client/scenes/stream.cpp @@ -1134,6 +1134,14 @@ void scenes::stream::setup_reprojection_swapchain() { std::unique_lock lock(decoder_mutex); device.waitIdle(); + try + { + session.set_refresh_rate(video_stream_description->fps); + } + catch (std::exception & e) + { + spdlog::warn("Failed to set refresh rate to {}: {}", video_stream_description->fps, e.what()); + } const uint32_t video_width = video_stream_description->width / view_count; const uint32_t video_height = video_stream_description->height;