Allow changing refresh rate during stream

This commit is contained in:
Sapphire
2025-11-11 22:09:04 +01:00
committed by xytovl
parent 68f6bf5e48
commit 015b242e27
8 changed files with 102 additions and 23 deletions
+1 -5
View File
@@ -232,11 +232,7 @@ std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_ses
if (config.preferred_refresh_rate and (config.preferred_refresh_rate == 0 or utils::contains(info.available_refresh_rates, *config.preferred_refresh_rate)))
{
info.preferred_refresh_rate = *config.preferred_refresh_rate;
if (info.preferred_refresh_rate == 0)
info.available_refresh_rates = {
std::ranges::lower_bound(info.available_refresh_rates, config.minimum_refresh_rate),
info.available_refresh_rates.end(),
};
info.minimum_refresh_rate = config.minimum_refresh_rate.value_or(0);
}
else
{