mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-30 06:46:45 -04:00
conf: add 'tweak.pty-prefetch-buffer-size-kb' setting
This controls the size of the buffers used by the PTY reader thread. The default is 512KB, for now.
This commit is contained in:
parent
984d008250
commit
1b06486c98
4 changed files with 19 additions and 11 deletions
13
config.c
13
config.c
|
|
@ -657,6 +657,18 @@ parse_section_tweak(
|
|||
conf->tweak.max_shm_pool_size);
|
||||
}
|
||||
|
||||
else if (strcmp(key, "pty-prefetch-buffer-size-kb") == 0) {
|
||||
unsigned long kb;
|
||||
if (!str_to_ulong(value, 10, &kb)) {
|
||||
LOG_ERR("%s:%d: expected an integer: %s", path, lineno, value);
|
||||
return false;
|
||||
}
|
||||
|
||||
conf->tweak.pty_prefetch_size = min(kb * 1024, UINT32_MAX);
|
||||
LOG_WARN("tweak: pty-prefetch-buffer-size=%u bytes",
|
||||
conf->tweak.pty_prefetch_size);
|
||||
}
|
||||
|
||||
else {
|
||||
LOG_ERR("%s:%u: invalid key: %s", path, lineno, key);
|
||||
return false;
|
||||
|
|
@ -930,6 +942,7 @@ config_load(struct config *conf, const char *conf_path)
|
|||
.delayed_render_lower_ns = 500000, /* 0.5ms */
|
||||
.delayed_render_upper_ns = 16666666 / 2, /* half a frame period (60Hz) */
|
||||
.max_shm_pool_size = 512 * 1024 * 1024,
|
||||
.pty_prefetch_size = 512 * 1024,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue