aboutsummaryrefslogtreecommitdiff
path: root/commands.c
diff options
context:
space:
mode:
authorBert Münnich <ber.t@posteo.de>2013-11-14 17:06:20 +0100
committerBert Münnich <ber.t@posteo.de>2013-11-14 17:06:20 +0100
commit50f9ad14de921295d7a1687799e30562808e940a (patch)
tree0176dbb630a74ba38a610020ad1802a8ae3d3fa1 /commands.c
parent2737fc8b81829372d454f407e19733d66d964272 (diff)
Refactored remote changes
Diffstat (limited to 'commands.c')
-rw-r--r--commands.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/commands.c b/commands.c
index 0e0029c..7562bd1 100644
--- a/commands.c
+++ b/commands.c
@@ -474,17 +474,10 @@ bool i_toggle_antialias(arg_t a)
}
}
-/* a < 0: decrease gamma
- * a == 0: reset gamma
- * a > 0: increase gamma
- */
bool i_change_gamma(arg_t a)
{
if (mode == MODE_IMAGE) {
- long val = (long) a;
- int delta = val > 0 ? 1 : (val < 0 ? -1 : -img.gamma);
- img_set_gamma(&img, img.gamma + delta);
- return true;
+ return img_change_gamma(&img, (long) a);
} else {
return false;
}