diff options
author | Mattias Andrée <m@maandree.se> | 2025-03-23 15:08:45 +0100 |
---|---|---|
committer | Mattias Andrée <m@maandree.se> | 2025-03-23 15:08:45 +0100 |
commit | 1ea4a4d1968b767912e70e18be8f0e1e22bf9c6f (patch) | |
tree | fdb5e2eb1fb03aa672281130ef71c579a262e81a /src/gamma-vidmode.c | |
parent | Update documentation reflect that the drm method now supports CRTC list (diff) | |
download | redshift-ng-1ea4a4d1968b767912e70e18be8f0e1e22bf9c6f.tar.gz redshift-ng-1ea4a4d1968b767912e70e18be8f0e1e22bf9c6f.tar.bz2 redshift-ng-1ea4a4d1968b767912e70e18be8f0e1e22bf9c6f.tar.xz |
Use libgamma to determine available adjustment method configuration options
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'src/gamma-vidmode.c')
-rw-r--r-- | src/gamma-vidmode.c | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/src/gamma-vidmode.c b/src/gamma-vidmode.c index e38de97..505fba0 100644 --- a/src/gamma-vidmode.c +++ b/src/gamma-vidmode.c @@ -32,29 +32,13 @@ vidmode_print_help(FILE *f) { fputs(_("Adjust gamma ramps with the X VidMode extension.\n"), f); fputs("\n", f); - - fputs(_(" screen=N X screen to apply adjustments to\n"), f); - fputs("\n", f); -} - - -static int -vidmode_set_option(struct gamma_state *state, const char *key, const char *value) -{ - if (!strcasecmp(key, "screen")) { - return direct_set_partitions(state, key, value); - } else if (!strcasecmp(key, "preserve")) { - weprintf(_("Deprecated method parameter ignored: `%s'."), key); - return 0; - } else { - weprintf(_("Unknown method parameter: `%s'."), key); - return -1; - } + direct_print_help(f, LIBGAMMA_METHOD_X_VIDMODE); } -#define vidmode_start direct_start -#define vidmode_apply direct_apply -#define vidmode_restore direct_restore -#define vidmode_free direct_free +#define vidmode_set_option direct_set_option +#define vidmode_start direct_start +#define vidmode_apply direct_apply +#define vidmode_restore direct_restore +#define vidmode_free direct_free const struct gamma_method vidmode_gamma_method = GAMMA_METHOD_INIT("vidmode", 1, 0, vidmode); |