aboutsummaryrefslogtreecommitdiffstats
path: root/src/gamma-drm.c
diff options
context:
space:
mode:
authorJon Lund Steffensen <jonlst@gmail.com>2014-12-27 20:22:04 -0500
committerJon Lund Steffensen <jonlst@gmail.com>2014-12-27 20:22:11 -0500
commitec5aa19acf1b768586688dd7c82ee0d64d314b40 (patch)
tree767475829fda9b9856532535e06dcb3ad02a5b32 /src/gamma-drm.c
parentredshift: Add config setting to set gamma separately for day/night (diff)
downloadredshift-ng-ec5aa19acf1b768586688dd7c82ee0d64d314b40.tar.gz
redshift-ng-ec5aa19acf1b768586688dd7c82ee0d64d314b40.tar.bz2
redshift-ng-ec5aa19acf1b768586688dd7c82ee0d64d314b40.tar.xz
redshift: Simplify set_temperature by passing color_setting_t
Changes all set_temperature function in gamma adjustment methods to take a color_setting_t pointer with the color settings. Colorramp functions are similarly changed to take a color settings struct.
Diffstat (limited to 'src/gamma-drm.c')
-rw-r--r--src/gamma-drm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gamma-drm.c b/src/gamma-drm.c
index e784b47..cbdafe5 100644
--- a/src/gamma-drm.c
+++ b/src/gamma-drm.c
@@ -241,7 +241,7 @@ drm_set_option(drm_state_t *state, const char *key, const char *value)
}
int
-drm_set_temperature(drm_state_t *state, int temp, float brightness, const float gamma[3])
+drm_set_temperature(drm_state_t *state, const color_setting_t *setting)
{
drm_crtc_state_t *crtcs = state->crtcs;
int last_gamma_size = 0;
@@ -269,7 +269,7 @@ drm_set_temperature(drm_state_t *state, int temp, float brightness, const float
last_gamma_size = crtcs->gamma_size;
}
colorramp_fill(r_gamma, g_gamma, b_gamma, crtcs->gamma_size,
- temp, brightness, gamma);
+ setting);
drmModeCrtcSetGamma(state->fd, crtcs->crtc_id, crtcs->gamma_size,
r_gamma, g_gamma, b_gamma);
}