allow disabling anti-aliasing via cli flag

simply running nsxiv with `--anti-alias` will enable anti-aliasing, and
running it with `--anti-alias=no` will disable it.

the cli flag will overwrite the config.h default.

Closes: https://codeberg.org/nsxiv/nsxiv/issues/349
This commit is contained in:
NRK
2022-08-17 20:54:14 +06:00
parent 7e3e6008fe
commit 88a480c938
5 changed files with 52 additions and 30 deletions

View File

@ -80,7 +80,7 @@ void img_init(img_t *img, win_t *win)
img->zoom = MIN(img->zoom, ZOOM_MAX);
img->checkpan = false;
img->dirty = false;
img->aa = ANTI_ALIAS;
img->aa = options->aa;
img->alpha = ALPHA_LAYER;
img->multi.cap = img->multi.cnt = 0;
img->multi.animate = options->animate;