Commit da22e108 authored by Ilya Pominov's avatar Ilya Pominov Committed by Ilya Pominov
Browse files

xrandr: Fix showing of gamma values

After applying commit 6bf48ae8 'xrandr
--current --verbose' shows multiplicative inverses for gamma.
For example, after 'xrandr --output <output> --gamma 0.5:0.5:0.5', the
output of 'xrandr --current --verbose' will be "Gamma: 2.0:2.0:2.0"
instead of expected "Gamma: 0.5:0.5:0.5".

Amends 6bf48ae8

Signed-off-by: Ilya Pominov's avatarIlya Pominov <ipominov@astralinux.ru>
parent 2fb90d4d
Pipeline #483769 passed with stages
in 1 minute and 33 seconds
......@@ -1160,6 +1160,10 @@ set_gamma_info(output_t *output)
/ 65535) / log((double)((last_green / 2) + 1) / size);
output->gamma.blue = log((double)(crtc_gamma->blue[last_blue / 2]) / output->brightness
/ 65535) / log((double)((last_blue / 2) + 1) / size);
output->gamma.red = 1.0 / output->gamma.red;
output->gamma.green = 1.0 / output->gamma.green;
output->gamma.blue = 1.0 / output->gamma.blue;
}
XRRFreeGamma(crtc_gamma);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment