mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-17 06:46:39 -04:00
output: Replace wlr_output_adaptive_sync_status with bool
This commit is contained in:
parent
28b03c3220
commit
6d8f3babe4
8 changed files with 15 additions and 32 deletions
|
|
@ -302,8 +302,7 @@ static bool atomic_crtc_commit(struct wlr_drm_connector *conn,
|
|||
&state->base->damage, &fb_damage_clips);
|
||||
}
|
||||
|
||||
bool prev_vrr_enabled =
|
||||
output->adaptive_sync_status == WLR_OUTPUT_ADAPTIVE_SYNC_ENABLED;
|
||||
bool prev_vrr_enabled = output->adaptive_sync_enabled;
|
||||
bool vrr_enabled = prev_vrr_enabled;
|
||||
if ((state->base->committed & WLR_OUTPUT_STATE_ADAPTIVE_SYNC_ENABLED)) {
|
||||
if (!drm_connector_supports_vrr(conn)) {
|
||||
|
|
@ -378,9 +377,7 @@ static bool atomic_crtc_commit(struct wlr_drm_connector *conn,
|
|||
commit_blob(drm, &crtc->gamma_lut, gamma_lut);
|
||||
|
||||
if (vrr_enabled != prev_vrr_enabled) {
|
||||
output->adaptive_sync_status = vrr_enabled ?
|
||||
WLR_OUTPUT_ADAPTIVE_SYNC_ENABLED :
|
||||
WLR_OUTPUT_ADAPTIVE_SYNC_DISABLED;
|
||||
output->adaptive_sync_enabled = vrr_enabled;
|
||||
wlr_drm_conn_log(conn, WLR_DEBUG, "VRR %s",
|
||||
vrr_enabled ? "enabled" : "disabled");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue