-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adaptive VRR support #1004
Adaptive VRR support #1004
Conversation
0f168b4
to
11ba699
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how best to test that VRR is actually working, but the changes here look good.
|
||
pub fn use_adaptive_sync(&mut self, vrr: AdaptiveSync) -> Result<bool> { | ||
if vrr != AdaptiveSync::Disabled { | ||
let (tx, rx) = std::sync::mpsc::sync_channel(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish std
had a oneshot channel, but I guess it's not worth adding a dependency for it when it's not already in the dependency tree.
pub enum AdaptiveSync { | ||
#[serde(rename = "true")] | ||
Enabled, | ||
#[serde(rename = "false")] | ||
Disabled, | ||
Force, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems a little odd to use a different terminology (enabled/force vs automatic/always) from the protocol, though it doesn't really matter that much.
Draft until cosmic-randr and cosmic-settings are ready