mirror of
https://github.com/LizardByte/Sunshine.git
synced 2026-11-30 01:03:11 +00:00
fix(linux/xdgportal): avoid duplicate frame insertion (#4839)
This commit is contained in:
1 parent
00fa2400dd
commit
99d4e053bf
3 files changed
+12
-2
No files matched your search
+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