From 88a480c9388d698f123bf892f33197d7bd1cfb9b Mon Sep 17 00:00:00 2001 From: NRK Date: Wed, 17 Aug 2022 20:54:14 +0600 Subject: 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 --- config.def.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'config.def.h') diff --git a/config.def.h b/config.def.h index 9ac3e9b..00f1f22 100644 --- a/config.def.h +++ b/config.def.h @@ -42,11 +42,6 @@ static const int GAMMA_RANGE = 32; /* command i_scroll pans image 1/PAN_FRACTION of screen width/height */ static const int PAN_FRACTION = 5; -/* if false, pixelate images at zoom level != 100%, - * toggled with 'a' key binding - */ -static const bool ANTI_ALIAS = true; - /* if true, use a checkerboard background for alpha layer, * toggled with 'A' key binding */ @@ -64,6 +59,14 @@ static const int CACHE_SIZE_MEM_PERCENTAGE = 3; /* use 3% of total memo static const int CACHE_SIZE_LIMIT = 256 * 1024 * 1024; /* but not above 256MiB */ static const int CACHE_SIZE_FALLBACK = 32 * 1024 * 1024; /* fallback to 32MiB if we can't determine total memory */ +#endif +#ifdef INCLUDE_OPTIONS_CONFIG + +/* if false, pixelate images at zoom level != 100%, + * toggled with 'a' key binding (overwritten via `--anti-alias` option) + */ +static const bool ANTI_ALIAS = true; + #endif #ifdef INCLUDE_THUMBS_CONFIG -- cgit v1.2.3-54-g00ecf