aboutsummaryrefslogtreecommitdiffstats
path: root/src/gamma-drm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gamma-drm.c')
-rw-r--r--src/gamma-drm.c29
1 files changed, 6 insertions, 23 deletions
diff --git a/src/gamma-drm.c b/src/gamma-drm.c
index f5aef31..798fc84 100644
--- a/src/gamma-drm.c
+++ b/src/gamma-drm.c
@@ -32,30 +32,13 @@ drm_print_help(FILE *f)
{
fputs(_("Adjust gamma ramps with Direct Rendering Manager.\n"), f);
fputs("\n", f);
-
- /* TRANSLATORS: DRM help output left column must not be translated */
- fputs(_(" card=N Graphics card to apply adjustments to\n"), f);
- fputs(_(" crtc=N List of comma-separated CRTCs to apply adjustments to\n"), f);
- fputs("\n", f);
-}
-
-
-static int
-drm_set_option(struct gamma_state *state, const char *key, const char *value)
-{
- if (!strcasecmp(key, "card")) {
- return direct_set_partitions(state, key, value);
- } else if (!strcasecmp(key, "crtc")) {
- return direct_set_crtcs(state, key, value);
- } else {
- weprintf(_("Unknown method parameter: `%s'."), key);
- return -1;
- }
+ direct_print_help(f, LIBGAMMA_METHOD_LINUX_DRM);
}
-#define drm_start direct_start
-#define drm_apply direct_apply
-#define drm_restore direct_restore
-#define drm_free direct_free
+#define drm_set_option direct_set_option
+#define drm_start direct_start
+#define drm_apply direct_apply
+#define drm_restore direct_restore
+#define drm_free direct_free
const struct gamma_method drm_gamma_method = GAMMA_METHOD_INIT("drm", 0, 0, drm);