diff options
author | Mattias Andrée <m@maandree.se> | 2025-03-05 11:14:29 +0100 |
---|---|---|
committer | Mattias Andrée <m@maandree.se> | 2025-03-05 11:14:29 +0100 |
commit | 3e9d096ed58ce866968087567e01086365c67889 (patch) | |
tree | 9d462b85173d3397ee759eda4d2c87999a659d92 | |
parent | Unlist redshift/pull/772: rejected (diff) | |
parent | Add preserve-gamma configuration option (diff) | |
download | redshift-ng-3e9d096ed58ce866968087567e01086365c67889.tar.gz redshift-ng-3e9d096ed58ce866968087567e01086365c67889.tar.bz2 redshift-ng-3e9d096ed58ce866968087567e01086365c67889.tar.xz |
Merge branch 'add-preserve-gamma-config-option' of https://github.com/kenoh/redshift
Diffstat (limited to '')
-rw-r--r-- | redshift.1 | 3 | ||||
-rw-r--r-- | src/options.c | 4 |
2 files changed, 7 insertions, 0 deletions
@@ -141,6 +141,9 @@ Gamma adjustment to apply at daytime \fBgamma-night\fR = \fIR\fB:\fIG\fB:\fIB\fR Gamma adjustment to apply at night .TP +\fBpreserve-gamma\fR = \fI0 or 1\fR +Reset existing gamma ramps before applying new color effect. (On by default) +.TP \fBadjustment\-method\fR = \fIname\fR Select adjustment method. Options for the adjustment method can be given under the configuration file heading of the same name. diff --git a/src/options.c b/src/options.c index 729140e..aadd317 100644 --- a/src/options.c +++ b/src/options.c @@ -572,6 +572,10 @@ parse_config_file_option( return -1; } } + } else if (strcasecmp(key, "preserve-gamma") == 0) { + if (options->preserve_gamma == 1) { + options->preserve_gamma = !!atoi(value); + } } else if (strcasecmp(key, "adjustment-method") == 0) { if (options->method == NULL) { options->method = find_gamma_method( |