diff options
author | Jon Lund Steffensen <jonlst@gmail.com> | 2011-04-21 00:23:50 +0200 |
---|---|---|
committer | Jon Lund Steffensen <jonlst@gmail.com> | 2011-04-21 00:23:50 +0200 |
commit | 38af3a0d5e22399b515ceb037870c3ef22662bb7 (patch) | |
tree | b458a9e17fdf8aa7fb21cb03b28beb107c1587cb /src/gamma-vidmode.c | |
parent | w32gdi: Remember to release the DC handle on error. (diff) | |
download | redshift-ng-38af3a0d5e22399b515ceb037870c3ef22662bb7.tar.gz redshift-ng-38af3a0d5e22399b515ceb037870c3ef22662bb7.tar.bz2 redshift-ng-38af3a0d5e22399b515ceb037870c3ef22662bb7.tar.xz |
Allow brightness to be adjusted (between 10% and 100%, the latter being the default).
Diffstat (limited to 'src/gamma-vidmode.c')
-rw-r--r-- | src/gamma-vidmode.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gamma-vidmode.c b/src/gamma-vidmode.c index 7b891d8..a083658 100644 --- a/src/gamma-vidmode.c +++ b/src/gamma-vidmode.c @@ -169,7 +169,8 @@ vidmode_restore(vidmode_state_t *state) } int -vidmode_set_temperature(vidmode_state_t *state, int temp, float gamma[3]) +vidmode_set_temperature(vidmode_state_t *state, int temp, float brightness, + float gamma[3]) { int r; @@ -185,7 +186,7 @@ vidmode_set_temperature(vidmode_state_t *state, int temp, float gamma[3]) uint16_t *gamma_b = &gamma_ramps[2*state->ramp_size]; colorramp_fill(gamma_r, gamma_g, gamma_b, state->ramp_size, - temp, gamma); + temp, brightness, gamma); /* Set new gamma ramps */ r = XF86VidModeSetGammaRamp(state->display, state->screen_num, |