diff options
author | Jon Lund Steffensen <jonlst@gmail.com> | 2014-03-22 20:13:00 +0100 |
---|---|---|
committer | Jon Lund Steffensen <jonlst@gmail.com> | 2014-03-22 20:13:00 +0100 |
commit | 09efaddd23468ef3d906c13e3d725e2341d757be (patch) | |
tree | 01bba123ef11d342732eea114e9a4e509e3d3f5f /src/redshift.c | |
parent | Update Fedora spec file with systemd unit install (diff) | |
parent | Support for running Redshift without a graphical environment in Linux by using Direct Rendering Manager (diff) | |
download | redshift-ng-09efaddd23468ef3d906c13e3d725e2341d757be.tar.gz redshift-ng-09efaddd23468ef3d906c13e3d725e2341d757be.tar.bz2 redshift-ng-09efaddd23468ef3d906c13e3d725e2341d757be.tar.xz |
Merge pull request #42 from maandree/gamma-drm
Support for running Redshift outside X using libdrm
Diffstat (limited to 'src/redshift.c')
-rw-r--r-- | src/redshift.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/redshift.c b/src/redshift.c index e4143fc..beecd35 100644 --- a/src/redshift.c +++ b/src/redshift.c @@ -53,6 +53,10 @@ #include "gamma-dummy.h" +#ifdef ENABLE_DRM +# include "gamma-drm.h" +#endif + #ifdef ENABLE_RANDR # include "gamma-randr.h" #endif @@ -75,6 +79,9 @@ /* Union of state data for gamma adjustment methods */ typedef union { +#ifdef ENABLE_DRM + drm_state_t drm; +#endif #ifdef ENABLE_RANDR randr_state_t randr; #endif @@ -89,6 +96,18 @@ typedef union { /* Gamma adjustment method structs */ static const gamma_method_t gamma_methods[] = { +#ifdef ENABLE_DRM + { + "drm", 0, + (gamma_method_init_func *)drm_init, + (gamma_method_start_func *)drm_start, + (gamma_method_free_func *)drm_free, + (gamma_method_print_help_func *)drm_print_help, + (gamma_method_set_option_func *)drm_set_option, + (gamma_method_restore_func *)drm_restore, + (gamma_method_set_temperature_func *)drm_set_temperature + }, +#endif #ifdef ENABLE_RANDR { "randr", 1, |