diff options
author | Mattias Andrée <m@maandree.se> | 2025-03-23 14:42:29 +0100 |
---|---|---|
committer | Mattias Andrée <m@maandree.se> | 2025-03-23 14:42:29 +0100 |
commit | 7fa55936625695321d29f3e9570a78b407627087 (patch) | |
tree | 8678ea80f48dd20d461a066c9afa183ec52c5d54 | |
parent | Rewrite gamma-drm.c to use libgamma (diff) | |
download | redshift-ng-7fa55936625695321d29f3e9570a78b407627087.tar.gz redshift-ng-7fa55936625695321d29f3e9570a78b407627087.tar.bz2 redshift-ng-7fa55936625695321d29f3e9570a78b407627087.tar.xz |
Relay on libgamma for selecting adjustment method support
Signed-off-by: Mattias Andrée <m@maandree.se>
-rw-r--r-- | src/Makefile | 2 | ||||
-rw-r--r-- | src/common.h | 10 | ||||
-rw-r--r-- | src/config.mk | 3 | ||||
-rw-r--r-- | src/gamma-quartz.c | 2 | ||||
-rw-r--r-- | src/gamma-w32gdi.c | 2 | ||||
-rw-r--r-- | src/gamma.c | 10 |
6 files changed, 7 insertions, 22 deletions
diff --git a/src/Makefile b/src/Makefile index a674b2e..d37ae41 100644 --- a/src/Makefile +++ b/src/Makefile @@ -16,8 +16,10 @@ OBJ =\ gamma-coopgamma.o\ gamma-drm.o\ gamma-dummy.o\ + gamma-quartz.o\ gamma-randr.o\ gamma-vidmode.o\ + gamma-w32gdi.o\ hooks.o\ location.o\ location-geoclue2.o\ diff --git a/src/common.h b/src/common.h index e79c6f4..aa929ae 100644 --- a/src/common.h +++ b/src/common.h @@ -1584,21 +1584,11 @@ extern const struct gamma_method dummy_gamma_method; #ifdef ENABLE_COOPGAMMA extern const struct gamma_method coopgamma_gamma_method; #endif -#ifdef ENABLE_RANDR extern const struct gamma_method randr_gamma_method; -#endif -#ifdef ENABLE_VIDMODE extern const struct gamma_method vidmode_gamma_method; -#endif -#ifdef ENABLE_DRM extern const struct gamma_method drm_gamma_method; -#endif -#ifdef ENABLE_QUARTZ extern const struct gamma_method quartz_gamma_method; -#endif -#ifdef ENABLE_W32GDI extern const struct gamma_method w32gdi_gamma_method; -#endif extern const struct location_provider manual_location_provider; #ifdef ENABLE_GEOCLUE2 diff --git a/src/config.mk b/src/config.mk index b16b4c9..d8e2a19 100644 --- a/src/config.mk +++ b/src/config.mk @@ -15,7 +15,6 @@ GEOCLUE_LIBS = glib-2.0 gio-2.0 LIBS_PKGCONFIG = $(DRM_LIBS) $(GEOCLUE_LIBS) libgamma CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_GNU_SOURCE\ - -DENABLE_DRM -DENABLE_GEOCLUE2 -DENABLE_RANDR -DENABLE_VIDMODE\ - -DENABLE_COOPGAMMA + -DENABLE_GEOCLUE2 -DENABLE_COOPGAMMA CFLAGS = $$($(PKGCONFIG_CFLAGS) $(LIBS_PKGCONFIG)) LDFLAGS = $$($(PKGCONFIG_LDFLAGS) $(LIBS_PKGCONFIG)) -lm -lcoopgamma -lred diff --git a/src/gamma-quartz.c b/src/gamma-quartz.c index 4cb050a..ba8a4c4 100644 --- a/src/gamma-quartz.c +++ b/src/gamma-quartz.c @@ -38,6 +38,8 @@ quartz_print_help(FILE *f) static int quartz_set_option(struct gamma_state *state, const char *key, const char *value) { + (void) state; + (void) value; if (!strcasecmp(key, "preserve")) { weprintf(_("Deprecated method parameter ignored: `%s'."), key); return 0; diff --git a/src/gamma-w32gdi.c b/src/gamma-w32gdi.c index 8232c85..d06f6b1 100644 --- a/src/gamma-w32gdi.c +++ b/src/gamma-w32gdi.c @@ -38,6 +38,8 @@ w32gdi_print_help(FILE *f) static int w32gdi_set_option(struct gamma_state *state, const char *key, const char *value) { + (void) state; + (void) value; if (!strcasecmp(key, "preserve")) { weprintf(_("Deprecated method parameter ignored: `%s'."), key); return 0; diff --git a/src/gamma.c b/src/gamma.c index 5b64f8c..1d21a06 100644 --- a/src/gamma.c +++ b/src/gamma.c @@ -24,21 +24,11 @@ const struct gamma_method *gamma_methods[] = { #ifdef ENABLE_COOPGAMMA &coopgamma_gamma_method, #endif -#ifdef ENABLE_DRM &drm_gamma_method, -#endif -#ifdef ENABLE_RANDR &randr_gamma_method, -#endif -#ifdef ENABLE_VIDMODE &vidmode_gamma_method, -#endif -#ifdef ENABLE_QUARTZ &quartz_gamma_method, -#endif -#ifdef ENABLE_WINGDI &w32gdi_gamma_method, -#endif &dummy_gamma_method, NULL }; |