From ec5aa19acf1b768586688dd7c82ee0d64d314b40 Mon Sep 17 00:00:00 2001 From: Jon Lund Steffensen Date: Sat, 27 Dec 2014 20:22:04 -0500 Subject: 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. --- src/gamma-drm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gamma-drm.c') 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); } -- cgit v1.2.3-70-g09d2