aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-08-08 11:11:12 +0200
committerMattias Andrée <maandree@operamail.com>2014-08-08 11:11:12 +0200
commit7f48220e127ac7e7a83a9b1826e52bc75c2f2288 (patch)
tree65d488dbc6713968f0fb5204d39e84af3c461b6a /src
parentinstructions for constrast–brightness + reconfigure tty + fork to be sure everything is kept clean (diff)
downloadcrt-calibrator-7f48220e127ac7e7a83a9b1826e52bc75c2f2288.tar.gz
crt-calibrator-7f48220e127ac7e7a83a9b1826e52bc75c2f2288.tar.bz2
crt-calibrator-7f48220e127ac7e7a83a9b1826e52bc75c2f2288.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-rw-r--r--src/gamma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gamma.c b/src/gamma.c
index 660c013..843403d 100644
--- a/src/gamma.c
+++ b/src/gamma.c
@@ -64,7 +64,7 @@ void gamma_generate(size_t stops, uint16_t* restrict ramp, double gamma,
{
y_ = (double)i / (double)stops;
y_ = pow(y_, gamma_) * diff + brightness;
- y = (int32_t)(y * 0xFFFF);
+ y = (int32_t)(y_ * 0xFFFF);
if (y < 0x0000) y = 0x0000;
if (y > 0xFFFF) y = 0xFFFF;
ramp[i] = (uint16_t)y;