Refactored remote changes

This commit is contained in:
Bert Münnich
2013-11-14 17:06:20 +01:00
parent 2737fc8b81
commit 50f9ad14de
7 changed files with 66 additions and 46 deletions

View File

@ -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;
}