aboutsummaryrefslogtreecommitdiffstats
path: root/config.def.h
diff options
context:
space:
mode:
authorNRK <nrk@disroot.org>2022-08-17 16:54:14 +0200
committerNRK <nrk@disroot.org>2022-09-10 15:43:07 +0200
commit88a480c9388d698f123bf892f33197d7bd1cfb9b (patch)
treeaa0e9e3075c0d3f8f71355e0fde9cfa7025b1e75 /config.def.h
parent7e3e6008fec8f7de8fa3c3545a76d5380ba48944 (diff)
downloadnsxiv-88a480c9388d698f123bf892f33197d7bd1cfb9b.tar.zst
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
Diffstat (limited to 'config.def.h')
-rw-r--r--config.def.h13
1 files changed, 8 insertions, 5 deletions
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
*/
@@ -65,6 +60,14 @@ 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
/* thumbnail sizes in pixels (width == height): */