aboutsummaryrefslogtreecommitdiffstats
path: root/src/gamma.c
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2025-03-23 15:43:04 +0100
committerMattias Andrée <m@maandree.se>2025-03-23 15:43:04 +0100
commitc6baeaa6c016e2d4b7156019127454ef46e6e94a (patch)
treeaf4681c94ee40413159e9fdd11562785a34752a1 /src/gamma.c
parentm fix (diff)
downloadredshift-ng-c6baeaa6c016e2d4b7156019127454ef46e6e94a.tar.gz
redshift-ng-c6baeaa6c016e2d4b7156019127454ef46e6e94a.tar.bz2
redshift-ng-c6baeaa6c016e2d4b7156019127454ef46e6e94a.tar.xz
Exclude unavailable adjustment methods when listing and trying
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'src/gamma.c')
-rw-r--r--src/gamma.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gamma.c b/src/gamma.c
index 1d21a06..a66f2b2 100644
--- a/src/gamma.c
+++ b/src/gamma.c
@@ -117,6 +117,8 @@ acquire_adjustment_method(struct settings *settings, GAMMA_STATE **method_state_
for (i = 0; gamma_methods[i]; i++) {
if (!gamma_methods[i]->autostart)
continue;
+ if (!gamma_methods[i]->is_available())
+ continue;
if (try_start(gamma_methods[i], method_state_out, &settings->config, NULL) < 0) {
weprintf(_("Trying next method..."));