diff options
author | Mattias Andrée <m@maandree.se> | 2025-03-23 16:39:17 +0100 |
---|---|---|
committer | Mattias Andrée <m@maandree.se> | 2025-03-23 16:39:17 +0100 |
commit | 7b15478612e981937a06a709d99b40d71abd6c20 (patch) | |
tree | 35177bbf38ed77d96d62d6b1e47c1d4ec15edf6f /src/backend-direct.c | |
parent | add display option + update doc about all screens being the default (diff) | |
download | redshift-ng-7b15478612e981937a06a709d99b40d71abd6c20.tar.gz redshift-ng-7b15478612e981937a06a709d99b40d71abd6c20.tar.bz2 redshift-ng-7b15478612e981937a06a709d99b40d71abd6c20.tar.xz |
Restore support for preserve-gamma, with corrected order of application
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'src/backend-direct.c')
-rw-r--r-- | src/backend-direct.c | 5 |
1 files changed, 4 insertions, 1 deletions
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,\ |