mirror of
https://github.com/LizardByte/Sunshine.git
synced 2026-08-07 18:36:34 +00:00
fix(linux/xdgportal): avoid duplicate frame insertion (#4839)
This commit is contained in:
+3
-2
@@ -1972,8 +1972,9 @@ namespace video {
|
||||
}
|
||||
});
|
||||
|
||||
// set max frame time based on client-requested target framerate.
|
||||
double minimum_fps_target = (config::video.minimum_fps_target > 0.0) ? config::video.minimum_fps_target : config.framerate;
|
||||
// set max frame time based on client-requested target framerate (or 0.5fps/2000ms for event-driven capture)
|
||||
double def_fps_target = (disp->is_event_driven() ? 1 : config.framerate);
|
||||
double minimum_fps_target = (config::video.minimum_fps_target > 0.0) ? config::video.minimum_fps_target : def_fps_target;
|
||||
std::chrono::duration<double, std::milli> max_frametime {1000.0 / minimum_fps_target};
|
||||
BOOST_LOG(info) << "Minimum FPS target set to ~"sv << (minimum_fps_target / 2) << "fps ("sv << max_frametime.count() * 2 << "ms)"sv;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user