diff options
author | Jon Lund Steffensen <jonlst@gmail.com> | 2014-12-27 20:35:00 -0500 |
---|---|---|
committer | Jon Lund Steffensen <jonlst@gmail.com> | 2014-12-27 20:35:00 -0500 |
commit | 87cec6b3661d9367b1d59935a41d3eab2e32c5b3 (patch) | |
tree | 767475829fda9b9856532535e06dcb3ad02a5b32 /src/gamma-vidmode.c | |
parent | redshift: Use double for interpolation function (diff) | |
parent | redshift: Simplify set_temperature by passing color_setting_t (diff) | |
download | redshift-ng-87cec6b3661d9367b1d59935a41d3eab2e32c5b3.tar.gz redshift-ng-87cec6b3661d9367b1d59935a41d3eab2e32c5b3.tar.bz2 redshift-ng-87cec6b3661d9367b1d59935a41d3eab2e32c5b3.tar.xz |
Merge branch 'color-settings-struct'
Diffstat (limited to 'src/gamma-vidmode.c')
-rw-r--r-- | src/gamma-vidmode.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gamma-vidmode.c b/src/gamma-vidmode.c index 656ce00..58a552f 100644 --- a/src/gamma-vidmode.c +++ b/src/gamma-vidmode.c @@ -14,7 +14,7 @@ You should have received a copy of the GNU General Public License along with Redshift. If not, see <http://www.gnu.org/licenses/>. - Copyright (c) 2010 Jon Lund Steffensen <jonlst@gmail.com> + Copyright (c) 2010-2014 Jon Lund Steffensen <jonlst@gmail.com> */ #include <stdlib.h> @@ -33,6 +33,7 @@ #include <X11/extensions/xf86vmode.h> #include "gamma-vidmode.h" +#include "redshift.h" #include "colorramp.h" @@ -163,8 +164,8 @@ vidmode_restore(vidmode_state_t *state) } int -vidmode_set_temperature(vidmode_state_t *state, int temp, float brightness, - const float gamma[3]) +vidmode_set_temperature(vidmode_state_t *state, + const color_setting_t *setting) { int r; @@ -180,7 +181,7 @@ vidmode_set_temperature(vidmode_state_t *state, int temp, float brightness, uint16_t *gamma_b = &gamma_ramps[2*state->ramp_size]; colorramp_fill(gamma_r, gamma_g, gamma_b, state->ramp_size, - temp, brightness, gamma); + setting); /* Set new gamma ramps */ r = XF86VidModeSetGammaRamp(state->display, state->screen_num, |