From 7b15478612e981937a06a709d99b40d71abd6c20 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 23 Mar 2025 16:39:17 +0100 Subject: Restore support for preserve-gamma, with corrected order of application MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/backend-direct.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/backend-direct.c') diff --git a/src/backend-direct.c b/src/backend-direct.c index dd381fb..ea60676 100644 --- a/src/backend-direct.c +++ b/src/backend-direct.c @@ -571,7 +571,7 @@ direct_start(struct gamma_state *state) int -direct_apply(struct gamma_state *state, const struct colour_setting *setting, int preserve /* TODO */) +direct_apply(struct gamma_state *state, const struct colour_setting *setting, int preserve) { size_t i, err_count = 0, crtc, part; const char *errstr; @@ -584,6 +584,9 @@ direct_apply(struct gamma_state *state, const struct colour_setting *setting, in fill_ramps_##SUFFIX(state->crtcs[i].gamma_ramps.RAMPS.red,\ state->crtcs[i].gamma_ramps.RAMPS.green,\ state->crtcs[i].gamma_ramps.RAMPS.blue,\ + preserve ? state->crtcs[i].saved_gamma_ramps.RAMPS.red : NULL,\ + preserve ? state->crtcs[i].saved_gamma_ramps.RAMPS.green : NULL,\ + preserve ? state->crtcs[i].saved_gamma_ramps.RAMPS.blue : NULL,\ state->crtcs[i].gamma_ramps.size.red,\ state->crtcs[i].gamma_ramps.size.green,\ state->crtcs[i].gamma_ramps.size.blue,\ -- cgit v1.2.3-70-g09d2