Skip to content

Commit

Permalink
anvil/udev: Send refresh rate based on vrr state
Browse files Browse the repository at this point in the history
  • Loading branch information
Drakulix committed Nov 25, 2024
1 parent a8a4453 commit 25be1bc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion anvil/src/udev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1294,7 +1294,12 @@ impl AnvilState<UdevData> {
output
.current_mode()
.map(|mode| {
Refresh::fixed(Duration::from_secs_f64(1_000f64 / mode.refresh as f64))
let rate = Duration::from_secs_f64(1_000f64 / mode.refresh as f64);
if surface.compositor.vrr_enabled() {
Refresh::variable(rate)
} else {
Refresh::fixed(rate)
}
})
.unwrap_or(Refresh::Unknown),
seq as u64,
Expand Down

0 comments on commit 25be1bc

Please sign in to comment.