aboutsummaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2025-10-04 07:29:56 +0000
committerDaniel Eklöf <daniel@ekloef.se>2025-10-05 07:40:20 +0000
commitfac399415452edba6f20986e5f8fa479863582fe (patch)
treeab7cd95c8fd2af7d3ca36c727191a9dac0dfa77d /config.c
parentterm: osc8: tag *all* cells in a multi-column character as an URI (diff)
config: add tweak.min-stride-alignment
This allows the user to configure the value by which a surface buffer's stride must be an even multiple of. This can be used to ensure the stride meets the GPU driver's requirements for direct import. Defaults to 256. Set to 0 to disable. Closes #2182
Diffstat (limited to 'config.c')
-rw-r--r--config.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/config.c b/config.c
index 0de1a1be..459a1de9 100644
--- a/config.c
+++ b/config.c
@@ -2848,6 +2848,10 @@ parse_section_tweak(struct context *ctx)
#endif
}
+ else if (streq(key, "min-stride-alignment")) {
+ return value_to_uint32(ctx, 10, &conf->tweak.min_stride_alignment);
+ }
+
else {
LOG_CONTEXTUAL_ERR("not a valid option: %s", key);
return false;
@@ -3496,6 +3500,7 @@ config_load(struct config *conf, const char *conf_path,
.font_monospace_warn = true,
.sixel = true,
.surface_bit_depth = SHM_BITS_AUTO,
+ .min_stride_alignment = 256,
},
.touch = {