diff options
Diffstat (limited to 'src/gamma-drm.c')
-rw-r--r-- | src/gamma-drm.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gamma-drm.c b/src/gamma-drm.c index 04d4f2c..dec7074 100644 --- a/src/gamma-drm.c +++ b/src/gamma-drm.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) 2014 Mattias Andrée <maandree@member.fsf.org> + Copyright (c) 2014 Mattias Andrée <m@maandree.se> Copyright (c) 2017 Jon Lund Steffensen <jonlst@gmail.com> */ @@ -85,7 +85,7 @@ drm_init(drm_state_t **state) } static int -drm_start(drm_state_t *state) +drm_start(drm_state_t *state, program_mode_t mode) { /* Acquire access to a graphics card. */ long maxlen = strlen(DRM_DIR_NAME) + strlen(DRM_DEV_NAME) + 10; @@ -277,7 +277,7 @@ drm_set_temperature( drm_state_t *state, const color_setting_t *setting, int preserve) { drm_crtc_state_t *crtcs = state->crtcs; - int last_gamma_size = 0; + uint32_t last_gamma_size = 0; uint16_t *r_gamma = NULL; uint16_t *g_gamma = NULL; uint16_t *b_gamma = NULL; @@ -303,16 +303,16 @@ drm_set_temperature( } /* Initialize gamma ramps to pure state */ - int ramp_size = crtcs->gamma_size; - for (int i = 0; i < ramp_size; i++) { + uint32_t ramp_size = crtcs->gamma_size; + for (uint32_t i = 0; i < ramp_size; i++) { uint16_t value = (double)i/ramp_size * (UINT16_MAX+1); r_gamma[i] = value; g_gamma[i] = value; b_gamma[i] = value; } - colorramp_fill(r_gamma, g_gamma, b_gamma, crtcs->gamma_size, - setting); + colorramp_fill_u16(r_gamma, g_gamma, b_gamma, crtcs->gamma_size, + crtcs->gamma_size, crtcs->gamma_size, setting); drmModeCrtcSetGamma(state->fd, crtcs->crtc_id, crtcs->gamma_size, r_gamma, g_gamma, b_gamma); } |