mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-08 05:34:00 -04:00
config: replace union in config struct with simple width/height members
This commit is contained in:
parent
0beed9fcf6
commit
adde947fc5
5 changed files with 16 additions and 46 deletions
14
main.c
14
main.c
|
|
@ -399,18 +399,8 @@ main(int argc, char *const *argv)
|
|||
}
|
||||
if (conf_width > 0 && conf_height > 0) {
|
||||
conf.size.type = conf_size_type;
|
||||
|
||||
switch (conf_size_type) {
|
||||
case CONF_SIZE_PX:
|
||||
conf.size.px.width = conf_width;
|
||||
conf.size.px.height = conf_height;
|
||||
break;
|
||||
|
||||
case CONF_SIZE_CELLS:
|
||||
conf.size.cells.width = conf_width;
|
||||
conf.size.cells.height = conf_height;
|
||||
break;
|
||||
}
|
||||
conf.size.width = conf_width;
|
||||
conf.size.height = conf_height;
|
||||
}
|
||||
if (conf_server_socket_path != NULL) {
|
||||
free(conf.server_socket_path);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue