aboutsummaryrefslogtreecommitdiffstats
path: root/src/gammad.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-07-10 19:55:11 +0200
committerMattias Andrée <maandree@kth.se>2016-07-10 19:58:19 +0200
commitf3516bae2c5b5a5f34cfb6227256e907e7d73807 (patch)
treed656df36b083d6ae562753dd165f0151bdc007d6 /src/gammad.c
parentwhitespace (diff)
downloadcoopgammad-f3516bae2c5b5a5f34cfb6227256e907e7d73807.tar.gz
coopgammad-f3516bae2c5b5a5f34cfb6227256e907e7d73807.tar.bz2
coopgammad-f3516bae2c5b5a5f34cfb6227256e907e7d73807.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--src/gammad.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gammad.c b/src/gammad.c
index 49c6219..c04ba5d 100644
--- a/src/gammad.c
+++ b/src/gammad.c
@@ -129,6 +129,8 @@ int main(int argc, char** argv)
saved_errno = errno;
outputs[i].crtc = crtcs + i;
libgamma_crtc_information_destroy(&info);
+ outputs[i].ramps_size = outputs[i].red_size + outputs[i].green_size + outputs[i].blue_size;
+ /* outputs[i].ramps_size will be multipled by the stop-size later */
errno = saved_errno;
if (outputs[i].name == NULL)
goto fail;
@@ -154,24 +156,30 @@ int main(int argc, char** argv)
switch (outputs[i].depth)
{
case 8:
+ outputs[i].ramps_size *= sizeof(uint8_t);
LOAD_RAMPS(8, u8);
break;
case 16:
+ outputs[i].ramps_size *= sizeof(uint16_t);
LOAD_RAMPS(16, u16);
break;
case 32:
+ outputs[i].ramps_size *= sizeof(uint32_t);
LOAD_RAMPS(32, u32);
break;
default:
outputs[i].depth = 64;
/* fall through */
case 64:
+ outputs[i].ramps_size *= sizeof(uint64_t);
LOAD_RAMPS(64, u64);
break;
case -1:
+ outputs[i].ramps_size *= sizeof(float);
LOAD_RAMPS(f, f);
break;
case -2:
+ outputs[i].ramps_size *= sizeof(double);
LOAD_RAMPS(d, d);
break;
}